I tried getting rid of them as global variables, and writing like this:
Code: ags
However, now I have it telling me:
"Local variable cannot have the same name as an import"
for first line: 'DynamicSprite *buttonSavePic1 = DynamicSprite.CreateFromSaveGame(1, 192, 342);'
Searched for all other instances of buttonSavePic1 - they're only in this line. Confounded.
//no var declarations
function ShowSaveGUI() {
DynamicSprite *buttonSavePic1 = DynamicSprite.CreateFromSaveGame(1, 192, 342);
if (buttonSavePic1 != null) buttonSaveSlot1.NormalGraphic = buttonSavePic1.Graphic;
DynamicSprite *buttonSavePic2 = DynamicSprite.CreateFromSaveGame(2, 192, 342);
if (buttonSavePic2 != null) buttonSaveSlot2.NormalGraphic = buttonSavePic2.Graphic;
DynamicSprite *buttonSavePic3 = DynamicSprite.CreateFromSaveGame(3, 192, 342;
if (buttonSavePic3 != null) buttonSaveSlot3.NormalGraphic = buttonSavePic3.Graphic;
gSaveLoad.Visible = true;
}
However, now I have it telling me:
"Local variable cannot have the same name as an import"
for first line: 'DynamicSprite *buttonSavePic1 = DynamicSprite.CreateFromSaveGame(1, 192, 342);'
Searched for all other instances of buttonSavePic1 - they're only in this line. Confounded.