Greets everyone,
I wanted to try using the tprint function that Nick so kindly included with MUSHclient. However, when I tried to put it in my script file, I get an error.
I put:
at the beginning of my script file. Now when it is loaded I get this error:
I wish I could make sense of it. It seems it's missing an <eof> but I have no idea what that means or where to put it. Does anyone know what's causing this?
On a related note, I had been fooling around with tprint a few weeks ago. I wanted to call it from an alias so that I could specify the table I wanted printed in a wildcard, such as tprint * So I could type:
tprint cures
And have it print out the table cures. I copied and pasted the tprint function into my script file and then had my alias call this function.
I got an error when doing this because tprint was expecting a table, but got a string (wildcards[1]).
Does anyone know how I might create an alias that will have the tprint function print out a table specified in the wildcard?
I wanted to try using the tprint function that Nick so kindly included with MUSHclient. However, when I tried to put it in my script file, I get an error.
I put:
require "tprint"at the beginning of my script file. Now when it is loaded I get this error:
Run-time error
World: Curing - Plugin
Immediate execution
error loading module 'tprint' from file 'C:\Program Files\Games\MUSHclient\lua\tprint.lua':
C:\Program Files\Games\MUSHclient\lua\tprint.lua:50: '<eof>' expected near 'function'
stack traceback:
[C]: ?
[C]: in function 'require'
[string "Script file"]:13: in main chunkI wish I could make sense of it. It seems it's missing an <eof> but I have no idea what that means or where to put it. Does anyone know what's causing this?
On a related note, I had been fooling around with tprint a few weeks ago. I wanted to call it from an alias so that I could specify the table I wanted printed in a wildcard, such as tprint * So I could type:
tprint cures
And have it print out the table cures. I copied and pasted the tprint function into my script file and then had my alias call this function.
function print_table (name, line, wildcards)
tprint(wildcards[1])
endI got an error when doing this because tprint was expecting a table, but got a string (wildcards[1]).
Does anyone know how I might create an alias that will have the tprint function print out a table specified in the wildcard?