I feel like this is a dumb question, but it has been bothering me for a few days. None of these work. I feel like I'm misunderstanding something very basic. I couldn't get this to work with a simple print function, either.
Code:
Sends to mud:
------
Code:
Returns error:
----
Code:
Sends to mud:
Code:
function killThis2(thing)
DoAfterSpecial(math.random(1,3), "Send('kill ', (thing))", 12)
end
Sends to mud:
kill nil
------
Code:
something = ""
function killThis3(thing)
something = thing
DoAfterSpecial(math.random(1,3), "Send('kill ' .. (thing))", 12)
end
Returns error:
Run-time error
World: world.org
Immediate execution
[string "Timer: "]:1: attempt to concatenate global 'thing' (a nil value)
stack traceback:
[string "Timer: "]:1: in main chunk
----
Code:
function killThis4(thing)
DoAfterSpecial(math.random(1,3), "Send('kill ', [[thing]])", 12)
end
Sends to mud:
kill thing