Ok, i made 2 scripts.
1. Load Vars
registered event handler: sysLoadEvent
in the script box:
local path = getMudletHomeDir() .. "/myVariables.save"
table.load( path )
2. Save Vars
registered event handler: sysExitEvent
in the script box:
local path = getMudletHomeDir() .. "/myVariables.save"
table.save( path )
It seems to be loading fine, but not too sure why it doesn't save. I'm using mudlet on a mac. What's the right way to quit such that it saves?
Also,
WindowWidth=0;
WindowHeight=0;
WindowWidth, WindowHeight = getMainWindowSize();
createLabel( "ammoTypeConsole", WindowWidth - 300, 0, 300, 300, 0 )
setBackgroundColor( "ammoTypeConsole", 0, 0, 0, 0);
resizeWindow( "ammoTypeConsole", 105, 20 )
moveWindow( "ammoTypeConsole", 910, WindowHeight-21 )
clearUserWindow("ammoTypeConsole")
cecho("ammoTypeConsole", [[<p style="font-size:12pt"><b><center><font color="white">Ammo: ]].. ammoTypeCur .. [[</font></b></p></center>]])
This script is giving rise to this error
Lua syntax error:mudlet-lua/lua/GUIUtils.lua:813: attempt to call field 'Process' (a nil value)
ERROR: Lua compile error. compiling script of script:AmmoTypeConsole
Looks like a bug to me since i don't have any Process in my script. I'm probably mistaken because i don't know anything about it. Can anyone spot anything that'll give rise to such a problem? Or what other info is needed to deduce this?