Game.GetLocationName causes an illegal execption

Started by Cino, Mon 20/03/2006 16:02:36

Previous topic - Next topic

Cino

Well, I'm an AGS newbie and I just stared working on my own LucasArts GUI to learn a bit about the scripting language. Everything was working fine, but then I discovered that @OVERHOTSPOT@ seems to be pointing to the hotspot (or whatever) name string not giving the actual string value (for some reason I found nothing about that in the manual or in the forums). So that means I only have to initialize my label string once and the program seems to take care of the rest. It's comfy when it comes to GUI labels, but on the other hand - I can't use it in default messages in unhandled_event. So I tried using

Code: ags
vHotspot = Game.GetLocationName(mouse.x,mouse.y);


where vHotspot is a global String variable (yes, it's exported and imported and all that) to store the hotspot name so I can use it later to display the default message, but the line always gives me the following error:

Illegal execption
An exeption 0xC0000005 occured in ACWIN.EXE at EIP = 0x0043E24D ; program pointer is -42, ACI version 2.71.894, gtags (2039,36)

So what am I not aware of? Am I missing something? Or could it be a bug?

Khris


Cino

it in a function update_statlinelabel that is called by repeatedly_execute.

Edit:

Never mind, I put the Game.GetLocationName line in unhandled_event and it seems to work now. I guess I wasn't supposed to use it in repeatedly_execute then.

SMF spam blocked by CleanTalk