Fangames > Programming Questions

File errors

(1/1)

RebornIsaac:
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: ---if (argument0 = 1) {
if (file_exists("Save0") == true) {
loadGame();
}
else {
room_goto(rSomething01);
}
--- End code ---

However, when I try this, it sends me this message:

--- Code: ---ERROR in
action number 1
of Alarm Event for alarm 0
for object objFadeBlackIntro:

Error reading byte.
--- End code ---

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.

Anon70000:
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.

Sudnep:
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.

RebornIsaac:
Forgot to close this thread, already found my way around it, thanks to everybody anyways!

Navigation

[0] Message Index

Go to full version