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
➜ string.match
It is now over 60 days since the last post. This thread is closed.
Refresh page
| Posted by
| Kaye
(2 posts) Bio
|
| Date
| Sun 29 Jul 2007 04:26 AM (UTC) |
| Message
| I'm trying to do a LUA conditional on string.match in MUSHClient. As in:
if string.match("THIS", "HI") ~= nil then
world.Note("WHEE")
end
This gives me the error message:
[string "Script file"]:6: attempt to call field `match' (a nil value)
What am I doing wrong? Do I not have the string library somehow? If that's the case, how do I get it?
| | Top |
|
| Posted by
| Nick Gammon
Australia (23,173 posts) Bio
Forum Administrator |
| Date
| Reply #1 on Sun 29 Jul 2007 05:48 AM (UTC) |
| Message
| | You will automatically have the string library. Can you copy and paste the entire script up to the point of the error? The lines you pasted can't be line 6, which is the line given in the error message (unless there was something beforehand). |
- 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.
11,213 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top