Help! Big Error Makes Game Inaccessible!

Started by Whelandrew, Sat 26/04/2008 23:15:32

Previous topic - Next topic

Whelandrew

So, there I was, happily programming away in AGS 3.0.1. Then, when I loaded up the program today, I received this massive error upon loading my game:

"An error occurred whilst trying to load your game. The error was:

'.', hexadecimal value 0x00, is an invalid character. Line 1860, position 46."

I had been setting up functions for hotspot interaction but had put nothing in the brackets yet.

I had also changed the gui bar to display hotspot names and game score.

I'm not sure if either of those could be the cause but I'm at a loss and I can't work on my game anymore.
The bulb in my reading lamp went out.
I'm seeking enlightenment.

AdamM

Sounds easy enough to get access to your game back: just open your GlobalScript.asc in a text editor and delete the relevant line. Then AGS will have nothing to complain about when you start it up.

monkey0506

Alternatively, if the offending line isn't in the global script, you can delete your Game.agf file and rename Game.agf.bak to Game.agf (MAKE SURE YOU HAVE THE BACKUP FILE BEFORE DELETING GAME.AGF!). The backup file shouldn't contain anything that may possibly have become corrupted since the last time you started AGS, so it should be a safe and working copy.

Radiant

Things like this is why I make daily backups. Not that AGS has ever failed on me like that, but I'm not taking the chance.

Here's a general suggestion: create a file called "backup.bat" in notepad, then put it in the "startup items" folder in your start menu.

Code: ags

@echo off
c:
cd \backup
del backup3.arj
ren backup2.arj backup3.arj
ren backup1.arj backup2.arj
arj a backup1.zip c:\my_game\*.* -r


(substituting your favorite archiving program for ARJ as necessary).

Pumaman

Can you upload your Game.agf file? I'd like to see what it is that's caused this to happen.

Alternatively if you load the Game.agf file into a text editor and then post the lines around line 1860 here, that would help.

Whelandrew

I opened up game.agf in notepad and found that it ended like this:

      <PaletteEntry Index="20" Type="Gamewide" Red="56" Green="56" Blue="56" />
      <PaletteEntry Index="21" Type="Gamewide" Red="68" Green="68" Blue="68" />
      <PaletteEntry Index="22" Type="Gamewide" Red="80" Green="80" Blue="80" />
      <PaletteEntry Index="23" Type="Gamewide" Red="96" Green="96" Blue="96" />
      <PaletteEntry Index="24" Type="Gamewide" Red="112" Green="112" Blue="112" />
      <PaletteEntry Index="25" Type="Gamewide" Red="128" Green="128" Blue="128" />
      <PaletteEntry Index="26" Type="Gamewide" Red="144" Green="144" Blue="144" />
      <PaletteEntry Index="27" Type="Gamewide" Red="160" Green="160" Blue="160" />
      <PaletteEntry Index="28" Type="Gamewide" Red="180" Green="180" Blue="180" />
      <PaletteEntry Index="29" Type="Gamewide" Red="200" Green="200" Blue="200" />
      <PaletteEntry Index="30" Type="Gamewide" Red="224" Green="224" Blue="224" />
      <PaletteEntry Index="31"

And it just ended there! So I copied game.agf.bak over it and everything works fine again.
The bulb in my reading lamp went out.
I'm seeking enlightenment.

Pumaman

Did the game save successfully the last time you closed the editor? Your computer didn't crash while it was saving, did it?

Whelandrew

My image editing software crashed outside of the AGS program. I think there was a corrupted .bmp file involved. Nothing happened to the AGS program when the other program crashed. It closed and saved normally. But the error began to occur the next time I started it up.
The bulb in my reading lamp went out.
I'm seeking enlightenment.

Pumaman

Hmm, strange... let me know if it happens again.

SMF spam blocked by CleanTalk