Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ Lua ➜ error that I have no idea where is coming from

error that I have no idea where is coming from

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Oriol   (31 posts)  Bio
Date Wed 24 Jun 2009 07:50 AM (UTC)
Message
Hi,
I'm trying to script something, and this error keeps coming up randomly, but when I look at the line (650-660) they make no sense and have nothing to do with the error, or at least I don't think. Here's what it says.

Error raised in timer function (in wait module).
stack traceback:
[string "Plugin"]:655: in function <[string "Plugin"]:612>
Run-time error
Plugin: AlterAeon (called from world: alter aeon)
Function/Sub: wait.timer_resume called by timer
Reason: processing timer "wait_timer_2252"
C:\Program Files\MUSHclient\lua\wait.lua:51: [string "Plugin"]:655: attempt to
concatenate field '?' (a boolean value)
stack traceback:
[C]: in function 'error'
C:\Program Files\MUSHclient\lua\wait.lua:51: in function <C:\Program
Files\MUSHclient\lua\wait.lua:43>
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #1 on Wed 24 Jun 2009 09:50 AM (UTC)
Message
Which version of MUSHclient are you using?

It is hard to debug without seeing the script.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Fadedparadox   USA  (91 posts)  Bio
Date Reply #2 on Wed 24 Jun 2009 10:08 AM (UTC)

Amended on Wed 24 Jun 2009 10:13 AM (UTC) by Fadedparadox

Message
The error "attempt to concatenate field" comes up when you try concat two things, but one isn't a string or number.

The field "?" means the problem is that the item that it can't concat is in a table and what you're using to reference the key isn't a string (or is a string but is in a variable).

Oddly enough, it should say "(a nil value)" but it says "(a boolean value)". The only way I could replicate that is referencing it with a boolean value, or by using a metatable so it returns false or true when it can't find what it's looking for.

That's all I could figure out from the error, without seeing the script(s) itself.
Top

Posted by Oriol   (31 posts)  Bio
Date Reply #3 on Wed 24 Jun 2009 10:48 AM (UTC)
Message
Thanks, I'm going to try to look at this.
But when it says script line, since the script is inside a plugin, means inside the <script> xml tag, right? or could it be inside a trigger as well.
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #4 on Wed 24 Jun 2009 10:53 AM (UTC)
Message
If inside a plugin, the line number is relative to the script inside the plugin.

If you type:


/Debug "plugins"


Then it outputs, amongst other things, the script in the plugin. With a bit of mucking around subtracting the first line from the current line, you can work out which actual line the error is in.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Nick Gammon   Australia  (23,158 posts)  Bio   Forum Administrator
Date Reply #5 on Wed 24 Jun 2009 10:55 AM (UTC)
Message
Judging by this:


[string "Plugin"]:655: in function <[string "Plugin"]:612>


Unless you have a 655 line script in a trigger, it is the plugin script itself, inside the script tag. If you used "include standard constants" you need to offset that from the count.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


18,478 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.