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
➜ General
➜ always add punctuation unless it already exists
always add punctuation unless it already exists
|
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Lilbopeep
USA (42 posts) Bio
|
Date
| Wed 07 Dec 2011 02:41 AM (UTC) |
Message
| i've been trying to figure out how to do this. Basically, unless I have already used punctuation, I would like add a period to the end.
|
,.~`'~.,Dance Magic Dance,.~`'~., | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #1 on Wed 07 Dec 2011 03:21 AM (UTC) Amended on Wed 07 Dec 2011 03:25 AM (UTC) by Fiendish
|
Message
| In what language?
In Lua you could do something like...
punctuation_table = {"."=true,"?"=true,"!"=true}
if not punctuation_table[string.sub(your_string,-1)] then
your_string = your_string.."."
end
|
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Lilbopeep
USA (42 posts) Bio
|
Date
| Reply #2 on Wed 07 Dec 2011 03:56 AM (UTC) |
Message
| for instance ...
match on clan *
your_string = '%1'
punctuation_table = {"."=true,"?"=true,"!"=true}
if not punctuation_table[string.sub(your_string,-1)] then
your_string = your_string.."."
end
ColourNote ("Black", "Blue", " You clanned .. your_string ..")
|
,.~`'~.,Dance Magic Dance,.~`'~., | Top |
|
Posted by
| Fiendish
USA (2,534 posts) Bio
Global Moderator |
Date
| Reply #3 on Wed 07 Dec 2011 04:59 AM (UTC) |
Message
|
Lilbopeep said:
ColourNote ("Black", "Blue", " You clanned .. your_string ..")
is wrong.
You need
ColourNote ("Black", "Blue", " You clanned ".. your_string)
|
https://github.com/fiendish/aardwolfclientpackage | Top |
|
Posted by
| Lilbopeep
USA (42 posts) Bio
|
Date
| Reply #4 on Wed 07 Dec 2011 06:33 AM (UTC) |
Message
| perfect. Thanks for the help! |
,.~`'~.,Dance Magic Dance,.~`'~., | 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.
13,740 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top