Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: AnInhumer on Mon 21/02/2005 20:23:08

Title: Illegal exception (SOLVED)
Post by: AnInhumer on Mon 21/02/2005 20:23:08
I was attemptting to test my game when I recieved an "Illegal exception":

An exception 0xC0000005 occured in ACWIN.EXE at EIP = 0x00417BB0 ; program pointer is +6, ACI version 2.62.772, gtags (0,0)

If it helps at all I have added this script to:   function repeatedly_execute

string buffer;
GetLocationName(mouse.x,mouse.y,buffer);
string cursor;
if (GetCursorMode() == MODE_WALK)
{
StrCopy (cursor,"Walk to ");
}
else if (GetCursorMode() == MODE_LOOK)
{
StrCopy (cursor,"Look at");
}
else if (GetCursorMode() == MODE_USE)
{
StrCopy (cursor,"Use ");
}
SetLabelText(0,0,cursor+buffer);
}
Title: Re: Illegal exception
Post by: Ishmael on Mon 21/02/2005 20:47:51
Quote from: AnInhumer on Mon 21/02/2005 20:23:08
SetLabelText(0,0,cursor+buffer);

You're not allowed to do this. You should do as:

  StrCat(cursor, buffer);
  SetLabeText(0,0,cursor);

AGS handles strings only through functions, unlike integers.
Title: Re: Illegal exception
Post by: AnInhumer on Tue 22/02/2005 06:57:00
Thank you