I fired up MUSHclient for the first time in several months. As soon as I tried to load my world, I got hit by a series of error dialogues in the format of:
Additionally, the world output showed modules not found messages for "serialize", "json", and "tprint". According to the error message, it looked for e.g. serialize.lua under "L:\lua\lua\include\", which is my LUA_PATH environment variable, but not the default MUSHclient directory at "C:\Program Files (x86)\MUSHclient\lua\"
I was able to partially resolve this problem by adding "C:\Program Files (x86)\MUSHclient\lua\" to LUA_PATH, but surely there's a better way of doing this?
There are still a couple of issues such as this error I run into whenever I try to use the Mushclient mapper version 2.6. I will update with more information if I manage to resolve it.
It seems that the json package is throwing up unusual errors.
Edit 1: I've tried both MUSHclient 5.06 and 5.07-pre. I tried reinstallation first and it did not fix the problem.
Edit 2: In GMCP_Mapper.xml, I added
to the script section, right under require "json". When I reinstalled the plugin, "json missing" was the output.
I can run require "json" successfully and check that print(json.decode) gives me a function address, so it seems it's just the plugins that can't find the json module?
------------------------
Original error message for the record:
Line X: Error parsing script (Cannot load)Line Y: Error in file <something.xml>Additionally, the world output showed modules not found messages for "serialize", "json", and "tprint". According to the error message, it looked for e.g. serialize.lua under "L:\lua\lua\include\", which is my LUA_PATH environment variable, but not the default MUSHclient directory at "C:\Program Files (x86)\MUSHclient\lua\"
I was able to partially resolve this problem by adding "C:\Program Files (x86)\MUSHclient\lua\" to LUA_PATH, but surely there's a better way of doing this?
There are still a couple of issues such as this error I run into whenever I try to use the Mushclient mapper version 2.6. I will update with more information if I manage to resolve it.
Run-time error
Plugin: GMCP_Mapper (called from world: Achaea)
Function/Sub: OnPluginBroadcast called by Plugin GMCP_Mapper
Reason: Executing plugin GMCP_Mapper sub OnPluginBroadcast
[string "Plugin: GMCP_Mapper"]:1337: attempt to index global 'json' (a nil value)
stack traceback:
[string "Plugin: GMCP_Mapper"]:1337: in function <[string "Plugin: GMCP_Mapper"]:1313>
It seems that the json package is throwing up unusual errors.
Edit 1: I've tried both MUSHclient 5.06 and 5.07-pre. I tried reinstallation first and it did not fix the problem.
Edit 2: In GMCP_Mapper.xml, I added
if json then
print("json found")
else
print("json missing")
end
to the script section, right under require "json". When I reinstalled the plugin, "json missing" was the output.
I can run require "json" successfully and check that print(json.decode) gives me a function address, so it seems it's just the plugins that can't find the json module?
------------------------
Original error message for the record:
lugin: GMCP_Mapper (called from world: Achaea)
Immediate execution
[string "Plugin: GMCP_Mapper"]:12: module 'serialize' not found:
no field package.preload['serialize']
no file 'L:\lua\lua\include\serialize.lua'
no file '.\serialize.dll'
no file 'C:\Program Files (x86)\MUSHclient\serialize.dll'
no file 'C:\Program Files (x86)\MUSHclient\loadall.dll'
stack traceback:
[C]: in function 'require'
[string "Plugin: GMCP_Mapper"]:12: in main chunk
[WARNING] L:\Other\MC4\customstuff\GMCP_Mapper.xml
[WARNING] L:\Other\MC4\worlds\munjoie.MCL
Run-time error
Plugin: GMCP (called from world: Achaea)
Immediate execution
L:\Other\MC2\plugins\GMCP.plugin\scripts\main.lua:2: module 'json' not found:
no field package.preload['json']
no file 'L:\Other\MC2\plugins\GMCP.plugin\json.lua'
no file 'L:\Other\MC2\plugins\GMCP.plugin\libraries\json.lua'
no file 'L:\Other\MC2\plugins\GMCP.plugin\libraries\json\init.lua'
no file 'L:\Other\MC2\plugins\GMCP.plugin\json.dll'
no file 'L:\Other\MC2\plugins\GMCP.plugin\libraries\json.dll'
no file 'C:\Program Files (x86)\MUSHclient\json.dll'
no file 'C:\Program Files (x86)\MUSHclient\loadall.dll'
stack traceback:
[C]: in function 'require'
L:\Other\MC2\plugins\GMCP.plugin\scripts\main.lua:2: in main chunk
[C]: in function 'require'
[string "Plugin: GMCP"]:29: in main chunk
[WARNING] L:\Other\MC2\plugins\GMCP.plugin\plugin.xml
[WARNING] L:\Other\MC4\worlds\munjoie.MCL
installing mapwindow plugin
Run-time error
Plugin: GMCP_Unveiler (called from world: Achaea)
Immediate execution
L:\Other\MC2\plugins\GMCP.unveiler\scripts\main.lua:2: module 'tprint' not found:
no field package.preload['tprint']
no file 'L:\Other\MC2\plugins\GMCP.unveiler\tprint.lua'
no file 'L:\Other\MC2\plugins\GMCP.unveiler\libraries\tprint.lua'
no file 'L:\Other\MC2\plugins\GMCP.unveiler\libraries\tprint\init.lua'
no file 'L:\Other\MC2\plugins\GMCP.unveiler\tprint.dll'
no file 'L:\Other\MC2\plugins\GMCP.unveiler\libraries\tprint.dll'
no file 'C:\Program Files (x86)\MUSHclient\tprint.dll'
no file 'C:\Program Files (x86)\MUSHclient\loadall.dll'
stack traceback:
[C]: in function 'require'
L:\Other\MC2\plugins\GMCP.unveiler\scripts\main.lua:2: in main chunk
[C]: in function 'require'
[string "Plugin: GMCP_Unveiler"]:41: in main chunk
[WARNING] L:\Other\MC2\plugins\GMCP.unveiler\plugin.xml
[WARNING] L:\Other\MC4\worlds\munjoie.MCL
GMCP interface unavailable: not_installed
Run-time error
World: Achaea
Immediate execution
[string "Script file"]:2: module 'tprint' not found:
no field package.preload['tprint']
no file 'L:\lua\lua\include\tprint.lua'
no file '.\tprint.dll'
no file 'C:\Program Files (x86)\MUSHclient\tprint.dll'
no file 'C:\Program Files (x86)\MUSHclient\loadall.dll'
stack traceback:
[C]: in function 'require'
[string "Script file"]:2: in main chunk
Error context in script:
1 : require "math"
2*: require "tprint"
3 : require "serialize"
4 :
5 : --TextRectangle (250, 0, 0, 0, 0, 0x000000, 0, 0x000000, 0)
6 :