This I don't get at all.
Here's my code. It works:
- Code: Select all
void CheckPoint ()
{
viewcheckpointx = screenedge.x;
viewcheckpointy = screenedge.y;
saveVars("autosave.sav", "counters");
saveVars("autosave.sav", "levelswitches");
saveVars("autosave.sav", "flags");
saveVars("autosave.sav", "move");
saveVars("autosave.sav", "input");
}
Now if I add this line:
heartx0 = heart.0.x (heartx0 is a variable to store the current location of the heart actor)
I get the message "incompatible types. Cannot convert from struct to long int"
The problem is that a virtually exact same script already works, the "viewcheckpointx = screenedge.x;" line above (which not only doesn't cause an error, but does exactly what I want it to do).
Further, if I try to write the location of heart.0.x, I get the following error: "expected ;" whether there's a semicolon there or not.
Is it because heart.0 is a clone? If so, is there a way to save the x and y of specific clones in Global Script?
I was asked in an earlier question to post my full Ged. Here it is: http://ubuntuone.com/4PkVj9qoAgFls18jbLnxsD