Problem with GetAtScreenXY (hotspot) (SOLVED)

Started by Akumayo, Mon 20/03/2006 18:55:46

Previous topic - Next topic

Akumayo

I have the following line of code in my repeatedly_excecute:

Code: ags

if (Hotspot.GetAtScreenXY(character.x, character.y) == hotspot[talktocheck_ak]) {


talktocheck_ak is a variable, I have already ensured that it is set to a number 1-29, so it doesn't violate the hotspot numbers.
The following error is generated for the above line of code:

Quote
'[' expected

What have I done wrong?

Thank you for your time - Akumayo
"Power is not a means - it is an end."

Ashen

You need a character number for the coords, e.g. character[0].x, character[0].y, or to use the Script-o-name. If character is a pointer, you'll need to rename it, since it's a reserved keyword. (Although I think it'd have given a error when you declared it.)

Oh, and Happy Birthday ;D.
I know what you're thinking ... Don't think that.

Akumayo

Oh, oops, that was a stupid mistake, and I was looking at the hotspot part of it for solutions  :-[
It's supposed to be:  player.x, player.y

BTW, thanks!
"Power is not a means - it is an end."

SMF spam blocked by CleanTalk