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 ➜ Line Numbers of Errors

Line Numbers of Errors

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


Posted by Artel   USA  (65 posts)  Bio
Date Sat 13 Jan 2007 05:28 AM (UTC)
Message
I just finished converting my first plugin from VBscript to Lua, and of course, there are a few errors. The problem is, the line numbers that it gives me do not seem to correspond to anything (blank lines, etc). I've looked in both the plugin file (.xml) and the script file (.lua) and the line numbers don't even point to the function it gives me. I was always able to find the line easily in VBscript in the plugin file. Does anybody know how the line numbers can be interpreted?

Here's the error message, although it probably doesn't matter:
Error number: 0
Event:        Run-time error
Description:  [string "Plugin"]:307: attempt to concatenate a nil value
stack traceback:
	[string "Plugin"]:307: in function `displayQuest'
	[string "Plugin"]:241: in function `questMccp'
Called by:    Function/Sub: questMccp called by trigger
Reason: processing trigger "QuestMCCP"

Artel.
Top

Posted by Nick Gammon   Australia  (23,140 posts)  Bio   Forum Administrator
Date Reply #1 on Sun 14 Jan 2007 12:58 AM (UTC)
Message
The script section is only part of a plugin, so you have to add in the number of lines between the start of the plugin and the start of the script section.

Also, if you have included the Lua constants (there will be an "include" tag) then you also need to subtract out the number of lines in that file. You probably don't need the Lua constants file, so you could just omit it.

The resulting number should be the line number in the plugin where the error occurs.

- 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.


10,680 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.