(NOT SOLVED) Game Crashing when saving

Started by Olleh19, Wed 07/10/2020 23:55:06

Previous topic - Next topic

Olleh19

It was by accident that i run into it. I'm guessing it has to do with my attempt at a titlescreen.
Am i missing something when i just make the Goptions.Visible=true ?

Using the Thumbleweed Template.


I'm guessing that is what makes it crash, i have tried to take away bits of the code's like tweens and such, but what's bothering me is that it crashes and blaims the repeatedly_execute: Error: Null string referenced

Edit: However it goes to repeatedly_execute in the optionsscript i believe, where it shows save synthax, that i am completely clueless about.


Edited:

The line that's hightlighted is  SaveGameSlot(customSaveData.saveSlotId, customSaveData.saveSlotString);

Code: ags
/ Remember when the game was started
function game_start()
{
  TimeCount.GameStart();
#ifdef SCRIPT_API_v3507
  ScreenWidth = Screen.Width;
  ScreenHeight = Screen.Height;
#endif
#ifndef SCRIPT_API_v3507
  ScreenWidth = System.ScreenWidth;
  ScreenHeight = System.ScreenHeight;
#endif
}

// workaround to take a savegame screenshot without the gui
function repeatedly_execute() 
{
  TimeCount.RepExec();
  if (customSaveData.save_scheduled) {
    SaveGameSlot(customSaveData.saveSlotId, customSaveData.saveSlotString);
    customSaveData.saveSlotId = 0;
    customSaveData.saveSlotString = "";       
    customSaveData.save_scheduled = false;
  } 
}


#endif

#ifndef __VERB_GUI_MODULE__ //A dependency is missing
  #error Missing module 'OptionGui'
#endif




Crimson Wizard

#1
Quote from: Olleh19 on Wed 07/10/2020 23:55:06
I'm guessing that is what makes it crash, i have tried to take away bits of the code's like tweens and such, but what's bothering me is that it crashes and blaims the repeatedly_execute: Error: Null string referenced

Please post the script where it crashes, that is most important bit. When you're testing from editor, editor should be pointing you to the exact location where the error occured.

Olleh19

#2
Quote from: Crimson Wizard on Thu 08/10/2020 00:20:19
Quote from: Olleh19 on Wed 07/10/2020 23:55:06
I'm guessing that is what makes it crash, i have tried to take away bits of the code's like tweens and such, but what's bothering me is that it crashes and blaims the repeatedly_execute: Error: Null string referenced

Please post the script where it crashes, that is most important bit. When you're testing from editor, editor should be pointing you to the exact location where the error occured.

Code: ags
// Remember when the game was started
function game_start()
{
  TimeCount.GameStart();
#ifdef SCRIPT_API_v3507
  ScreenWidth = Screen.Width;
  ScreenHeight = Screen.Height;
#endif
#ifndef SCRIPT_API_v3507
  ScreenWidth = System.ScreenWidth;
  ScreenHeight = System.ScreenHeight;
#endif
}

// workaround to take a savegame screenshot without the gui
function repeatedly_execute() 
{
  TimeCount.RepExec();
  if (customSaveData.save_scheduled) {
    SaveGameSlot(customSaveData.saveSlotId, customSaveData.saveSlotString);
    customSaveData.saveSlotId = 0;
    customSaveData.saveSlotString = "";       
    customSaveData.save_scheduled = false;
  } 
}


The line that's hightlighted is  SaveGameSlot(customSaveData.saveSlotId, customSaveData.saveSlotString);

SMF spam blocked by CleanTalk