This is the code: function room_a() {
// script for Room: First time player enters screen
Character[cHomer].Think("What am I going to do?");
}
And the topic is the error I get. Sounds newbieish. What am I doing wrong?
You know what... I just figured out. I feel like an idiot. The script language changed and I have to the new scripting, which makes the script into : cHomer.Think. Sorry. You could delete.
You don't have to use cHomer.Think... you could do Character[cHomer.ID].Think if you really wanted to. :=
Actually, I think it would be character[cHomer.ID] or character[HOMER]. But of course the cHomer shortcut is much nicer.
Actually Monkey, I tried those, and thats what also gave me this error for some reason.
Use cHomer as recommended by many then, it should work.
Which AGS version are you using?
Quote from: Joseph DiPerla on Thu 15/09/2005 03:35:09
Actually Monkey, I tried those, and thats what also gave me this error for some reason.
Well that's because I accidentally used a 'C' instead of a 'c', as strazer pointed out. "Character" should be used when defining a pointer, i.e., Character *chara = Character.GetAtScreenXY(mouse.x, mouse.y). "character" is the globally defined array of all the characters in the game.
I was using AGS 2.71 beta 4. I got it working now. Like I said, I dropped the Character[cHomer].Think to cHomer. Think and it worked.