Game Crash - Custom Dungeon

Have trouble running Grimrock 1 or you're wondering if your graphics card is supported? Look for help here.
Post Reply
User avatar
Drachir
Posts: 17
Joined: Wed Aug 22, 2012 4:32 pm
Location: Southlands of UK

Game Crash - Custom Dungeon

Post by Drachir »

Hi All,

Was testing my dungeon as a Custom Game (i.e Not through the Editor) and the game crashed when clicking on a Healing Crystal.

Error log below;

pfire_script_1: cannot serialize table 'spawnid' with metatable
stack traceback:
[C]: in function 'error'
[string "ScriptEntity.lua"]: in function 'saveValue'
[string "ScriptEntity.lua"]: in function 'saveState'
[string "GameMode.lua"]: in function 'saveGame'
[string "GameMode.lua"]: in function 'autoSave'
[string "Crystal.lua"]: in function 'onClick'
[string "GameMode.lua"]: in function 'mousePressed'
[string "GameMode.lua"]: in function 'update'
[string "Grimrock.lua"]: in function 'display'
[string "Grimrock.lua"]: in main chunk

OS Version 6.1

OEM ID: 0
Number of processors: 4
Page size: 4096
Processor type: 586

Total memory: 4087 MB
Free memory: 2473 MB

Display device 0:
Device name: \\.\DISPLAY1
Device string: ATI Radeon HD 5700 Series
State flags: 08000005

Display device 1:
Device name: \\.\DISPLAY2
Device string: ATI Radeon HD 5700 Series
State flags: 00000000

Display device 2:
Device name: \\.\DISPLAY3
Device string: ATI Radeon HD 5700 Series
State flags: 00000000

Display device 3:
Device name: \\.\DISPLAYV1
Device string: RDPDD Chained DD
State flags: 00000008

Display device 4:
Device name: \\.\DISPLAYV2
Device string: RDP Encoder Mirror Driver
State flags: 00200008

Display device 5:
Device name: \\.\DISPLAYV3
Device string: RDP Reflector Display Driver
State flags: 00200008
User avatar
Drachir
Posts: 17
Joined: Wed Aug 22, 2012 4:32 pm
Location: Southlands of UK

Re: Game Crash - Custom Dungeon

Post by Drachir »

Hmm... solved it.

The problem is global variables used to store values that are not integer or text.

In my original code the variable 'spawnid' was used to hold the result of a findEntity() call.

Make it a local variable (by putting local in front of it) and the problem goes away.
Post Reply