I should have tried your example. This indeed causes an error (in any version):
Compile error
World: Aardwolf - Balaam
Immediate execution
[string "Script file"]:5: unexpected symbol near '='
Error context in script:
1 : --[[
2 : donatetrack = {}
3 : function donation( trig_name, trig_line, wildcards )
4 : donated = string.gsub( wildcards[2], ",", "" )
5*: donatetrack[wildcards[1]] = (donatetrack[wildcards[1]] or 0) + donated
6 : Note( wildcards[1].." donated "..donatetrack[wildcards[1]] )
7 : end
8 : ]]--
9 :
The reason is that the 'donatetrack[wildcards[1]]' in line 5 closes the block comment in line 1, and so you get an error about '=' immediately afterwards.
You need to be careful about block comments in code with ]] in it.
If you change it to:
--[=[
donatetrack = {}
function donation( trig_name, trig_line, wildcards )
donated = string.gsub( wildcards[2], ",", "" )
donatetrack[wildcards[1]] = (donatetrack[wildcards[1]] or 0) + donated
Note( wildcards[1].." donated "..donatetrack[wildcards[1]] )
end
]=]--
It works fine.
I should also point out that the intention of the block comments is to put the '--' first, like this:
--[=[
donatetrack = {}
function donation( trig_name, trig_line, wildcards )
donated = string.gsub( wildcards[2], ",", "" )
donatetrack[wildcards[1]] = (donatetrack[wildcards[1]] or 0) + donated
Note( wildcards[1].." donated "..donatetrack[wildcards[1]] )
end
--]=]
Note change to the last line. That way you can uncomment the entire block by adding one extra space. For example (block commented out):
Add a space (line 1) and the entire block is back again:
As for your initial problem, I think we need to focus on the real problem. The code above was simply a bad script (the way it was commented).
I would go back to gradually adding in plugins to try to isolate what is causing it.
Quote:
Is there a way to have MUSHclient (v 4.12) spit out error messages?
It generally does spit out error messages unless you crash it rather badly. Perhaps something has corrupted the heap or something.
Take a look at the release notes for version 4.13. The last couple of points might be relevant to you - let me know if they are.