constant.lua missing in world folder

Posted by Uchida on Sat 28 Jan 2023 06:20 PM — 6 posts, 17,026 views.

#0
Suddenly i am getting few error messages in mush like this

Compile error
World:
Immediate execution
[string "Trigger: counter"]:1: ')' expected near '<eof>' and when i

and when i restarted mush. I get error saying line 7, constant.lua was not found. (not loaded.)

please help!
Australia Forum Administrator #1
It looks to me like you have a coding error in your trigger, the one labelled "Counter". Perhaps if you post that trigger we could help you more.

Template:copying
For advice on how to copy aliases, timers or triggers from within MUSHclient, and paste them into a forum message, please see Copying XML.
#2
Hi Nick!

I have deleted the trigger "counter" and it no longer have the error but i still get the constant.lua is missing from the world folder error when i start mushclient. i tried looking for my backup but i did not find the constant.lua anywhere.
Australia Forum Administrator #3
Are you sure it isn't "constants.lua"?

Lua plugins may require that file. Do you have any plugins?
#4
hi ! yes it is constants.lua in the worlds folder.

here is the snipe of the error.
https://imgur.com/a/XOVIGFB

yes, i am using plugins. are you meaning there is a certain plugin that requires this constants.lua file?

thanks!
Australia Forum Administrator #5
Yes, probably a plugin. Please copy/paste the code below into a file called "show_loaded.lua" and put that file into the "lua" folder in your MUSHclient installation.


-- show_loaded.lua

--[[ 

Shows each plugin as it is loaded.

To enable this, add to:

  File menu -> Global Preferences -> Lua -> Preliminary Code 

  ... this line:
   
require "show_loaded"
  

--]]

if GetPluginID () == "" then
  ColourNote ("gray", "", "Initializing main world script ...")
else
  ColourNote ("gray", "", string.format ("Loading plugin '%s' (%s) version %0.2f ...",
    GetPluginInfo ( GetPluginID (), 7),
    GetPluginInfo ( GetPluginID (), 1),
    GetPluginInfo ( GetPluginID (), 19)))
end -- if



Now go to File menu -> Global Preferences -> Lua -> "Preliminary Code ..." and add the line:


require "show_loaded"


As each plugin is loaded you will see a message, and when the error occurs that will be the plugin that is causing it.