General Dungeon Editor glitches and problems

Talk about creating Grimrock 1 levels and mods here. Warning: forum contains spoilers!
Post Reply
User avatar
takis76
Posts: 78
Joined: Wed Apr 04, 2012 4:01 pm
Location: Athens - Greece

Re: General Dungeon Editor glitches and problems

Post by takis76 »

Strange:

I restarted my computer and I tried to load the same Mod "This Rotten Place" and the error was not reproduced.
But the second time my computer said about c++ runtime error. (I have c++ runtime libraries installed).

But (After restart)

Then I tried another one Mod with name "The Reeking Depths 1.4.5" from workshop. The error reproduced.

I tried many portraits. Very rare this error happens with the Mod "This Rotten Place" and constantly with the Mod "The Reeking Depths 1.4.5"

:) This might help you to track the problem.
User avatar
Emciel
Posts: 34
Joined: Fri Sep 14, 2012 2:19 am

Re: General Dungeon Editor glitches and problems

Post by Emciel »

Been having some problems with the editor crashing after about half an hour of it running.
Just a Windows window pops up saying legendofgrimrock.exe is no longer responding O.o

it's making me very careful to save regularly...
McSkivv
Posts: 30
Joined: Wed Sep 12, 2012 12:46 am

Re: General Dungeon Editor glitches and problems

Post by McSkivv »

Ok then. The "playthesound" error is my fault. It was a buggy function that I disabled and left for later. Apparently on saving, if an invalid function exists it causes the game to crash even without being used. After fixing that error, I tried again and got a new error. Upon starting my dungeon, The Reeking Depths 1.4.6 (Not on Steam Workshop yet), I quicksaved and got this:

Code: Select all

attempt to serialize function 'steptwo' with upvalues
stack traceback:
	[C]: in function 'error'
	[string "ScriptEntity.lua"]: in function 'saveState'
	[string "GameMode.lua"]: in function 'saveGame'
	[string "GameMode.lua"]: in function 'quickSave'
	[string "GameMode.lua"]: in function 'keyPressed'
	[string "Grimrock.lua"]: in function 'pollEvents'
	[string "Grimrock.lua"]: in function 'display'
	[string "Grimrock.lua"]: in main chunk

OS Version 6.0

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

Total memory: 3033 MB
Free memory: 1179 MB

Display device 0:
  Device name: \\.\DISPLAY1
  Device string: Mobile Intel(R) 4 Series Express Chipset Family
  State flags: 00000005

Display device 1:
  Device name: \\.\DISPLAY2
  Device string: Mobile Intel(R) 4 Series Express Chipset Family
  State flags: 00000000

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

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

EDIT: It happens with both saving and quicksaving

EDIT 2: "steptwo" is part of another function that is working properly.

Code: Select all

local cntdwn = 3
function stepone()
if cntdwn == 3
then
cntdwn = 2
else
cntdwn = 3
end
end

function steptwo()
if cntdwn == 2
then
cntdwn = 1
else
cntdwn = 3
end
end

function stepthree()
if cntdwn == 1
then
cntdwn = 0
else
cntdwn = 3
end
end

function chkdr()
if cntdwn == 0
then
dungeon_secret_door_28:open()
else
dungeon_secret_door_28:close()
end
end
Last edited by McSkivv on Fri Sep 14, 2012 10:28 pm, edited 1 time in total.
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: General Dungeon Editor glitches and problems

Post by petri »

The error "attempt to serialize function 'steptwo' with upvalues" means that your function called "steptwo" is using local variables that are defined outsided the function.

For example,

Code: Select all

local myVar = 0

function steptwo()
  print(myVar)
end
Either use "global" variables by removing the local keyword in front of variables, or move the local variable inside the function.

EDIT: I write "global" in quotation because it's not really a global variable. All variables except locals are visible only in the scope of the script entity, so there are no user definable global variables.
McSkivv
Posts: 30
Joined: Wed Sep 12, 2012 12:46 am

Re: General Dungeon Editor glitches and problems

Post by McSkivv »

I've posted the script that uses function steptwo() above. The local variable is contained with that script. Also, it works fine in extensive testing inside the editor.
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: General Dungeon Editor glitches and problems

Post by petri »

Your sample code uses a local variable that is not inside the scope of the function and hence the error. Just remove the "local" keyword and it should work ok.
McSkivv
Posts: 30
Joined: Wed Sep 12, 2012 12:46 am

Re: General Dungeon Editor glitches and problems

Post by McSkivv »

It worked. Thanks a heap, I would never have thought to remove the "local" bit. I thought that was what it was for. >.<
User avatar
petri
Posts: 1917
Joined: Thu Mar 01, 2012 4:58 pm
Location: Finland

Re: General Dungeon Editor glitches and problems

Post by petri »

Yeah, I guess we need to clarify this point in the documentation. The documentation about save games is a bit arcane at the moment. Glad that it worked.
The Real Pyxx
Posts: 13
Joined: Sun Jun 24, 2012 11:49 pm

Re: General Dungeon Editor glitches and problems

Post by The Real Pyxx »

petri wrote:Do you mean the "error lines" in the preview window`? It's part of the console that can be cleared by typing "clear" in it. You can access the console by pressing the § key. You can also configure the console key in grimrock.cfg to something else if you wish.

You can change the wallset from level's properties. Right click on the level in left-hand side Project view.
umm dumb noob here.. so what's the double S key you mentioned? not sure which one that is... man I feel dumb for asking.. lol
User avatar
Montis
Posts: 340
Joined: Sun Apr 15, 2012 1:25 am
Location: Grimrock II 2nd playthrough (hard/oldschool)

Re: General Dungeon Editor glitches and problems

Post by Montis »

that's a paragraph sign.

for me (German keyboard layout) the key left from "1" worked for the console.

I also have a keyboard with EN layout and what I did there was defining the key I wanted to "move forward" or something similar, then finding that key code in the config and replacing the console key with that. after that just revert the move forward and voila, console there.
When destiny calls, the chosen have no choice.

My completed dungeon (LoG1): Hypercube
Post Reply