I Wanna Community

Fangames => Game Design => Programming Questions => Topic started by: RebornIsaac on August 30, 2015, 09:28:33 PM

Title: File errors
Post by: RebornIsaac on August 30, 2015, 09:28:33 PM
Hi there! I'm having this problem whenever I try to start the game.

Let's call the object "objStartGame", whenever I release my Right Button on it, it creates "objFadeBlackIntro", this object makes such thing after an alarm depending on the argument0, if argument0 is 1 then it will use this code:
Code: [Select]
if (argument0 = 1) {
if (file_exists("Save0") == true) {
loadGame();
}
else {
room_goto(rSomething01);
}

However, when I try this, it sends me this message:
Code: [Select]
ERROR in
action number 1
of Alarm Event for alarm 0
for object objFadeBlackIntro:

Error reading byte.

Also, if I try to ignore it, it sends me back to rInit, making it impossible to progress on the game.

The savefile isn't there to see if it works without there being a Savefile, but it won't work, any help will be appreciated.
Title: Re: File errors
Post by: Anon70000 on September 06, 2015, 06:14:22 AM
It's really hard to detect a problem (for me prob.), but it looks like same as temp code for yuuutu (if temp exists, loads game instantly).
reading byte error appears if save is prob. broken or corrupted or even not opened (there were instances where deleting save helped), try opening it in hex editor to see what's in it, maybe it's empty.
Title: Re: File errors
Post by: Sudnep on September 06, 2015, 01:43:19 PM
Delete the save file and try again after re-creating the save file with the game.
If it still occurs there is probably a saved variable missing between saveGame(); and loadGame(); that was either accidentally deleted or forgotten to be added. It's trying to read a byte that doesn't exist.
Title: Re: File errors
Post by: RebornIsaac on September 06, 2015, 05:39:48 PM
Forgot to close this thread, already found my way around it, thanks to everybody anyways!