It's six years since I last did any real programming, so my apologies if this is something obvious. Here's my original code:
int typeUnderMouse;
function repeatedlyCheckStatus()
{ typeUnderMouse =0;
if (GetLocationType(mouse.x,mouse.y) == eLocationHotspot) typeUnderMouse =1;
if (GetLocationType(mouse.x,mouse.y) == eLocationCharacter) typeUnderMouse =2;
if (GetLocationType(mouse.x,mouse.y) == eLocationObject) typeUnderMouse =3;
SetGlobalInt(1,typeUnderMouse);
if(typeUnderMouse ==1) // line 24
{ // do stuff
}
And here's the error message:
"There was an error compiling your script. The problem was: In: 'repeatedExecute' Error (line 24): must have an instance of the struct to access a non-static member"
Can someone remind me what "an instance of the struct to access a non-static member" actually means?
Also, is there any way to save a game before the compile bugs are fixed? When I try to save I get the "you have an error, your game was not saved" message. It was late at night so I had to just leave the computer on and hope nothing happens to lose the day's work (e.g. crazy pets / environmentally conscious "turn everything off" grandparents / normal winter power cuts in my village / etc., etc.)
int typeUnderMouse;
function repeatedlyCheckStatus()
{ typeUnderMouse =0;
if (GetLocationType(mouse.x,mouse.y) == eLocationHotspot) typeUnderMouse =1;
if (GetLocationType(mouse.x,mouse.y) == eLocationCharacter) typeUnderMouse =2;
if (GetLocationType(mouse.x,mouse.y) == eLocationObject) typeUnderMouse =3;
SetGlobalInt(1,typeUnderMouse);
if(typeUnderMouse ==1) // line 24
{ // do stuff
}
And here's the error message:
"There was an error compiling your script. The problem was: In: 'repeatedExecute' Error (line 24): must have an instance of the struct to access a non-static member"
Can someone remind me what "an instance of the struct to access a non-static member" actually means?
Also, is there any way to save a game before the compile bugs are fixed? When I try to save I get the "you have an error, your game was not saved" message. It was late at night so I had to just leave the computer on and hope nothing happens to lose the day's work (e.g. crazy pets / environmentally conscious "turn everything off" grandparents / normal winter power cuts in my village / etc., etc.)