|
Ghaleon Newbie
Joined: 16 Mar 2003 Posts: 7
|
Posted: Mon Apr 26, 2004 4:47 am
Comma Problem |
Is anyone else having problems with commas interfering?
In the mud I play on there is the typical list of items in the room.
Example:
You notice longsword, shortsword and shield.
If I have a trigger set up such as the following:
You notice (*).$
and echo it, it comes out fine.
If I try to do anything with that string though via any functions, it stops at the comma? Ive tried using %string to transform it into a big string, nothing works it continually stops at the comma.
The example above would come out as just 'longsword' if it was used like this:
TRIGGER: You notice (*).$
VALUE: #var TempVar %1
I would like to know a way i could turn this into a stringlist but i tried replacing the ',' and 'and' with '|' and that still came out all messed up. Is there a problem with this new version?
Thanks
Ghaleon |
|
|
|
Ghaleon Newbie
Joined: 16 Mar 2003 Posts: 7
|
Posted: Mon Apr 26, 2004 5:01 am |
Problem solved
I have it now putting it into a variable using
@TempVar = %1
and it works, but still, should this still be not working the other way??
Ghaleon |
|
|
|
jessew Apprentice
Joined: 03 Mar 2003 Posts: 141
|
Posted: Mon Apr 26, 2004 5:20 am |
quote it yourself like
#VARIABLE TempVar "%1"
Jesse |
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Apr 26, 2004 6:02 pm |
You can also skip the variable and use quotes in the functions.
Converting strings to lists has no problems I'm aware of.
#TR {You notice (*).} {
#SAY Without quotes: %upper( %1)
#SAY With quotes: %upper( "%1")
#VAR TempList {%replace( %replace( "%1", ", ", "|"), " and ", "|")}
#SAY {~@TempList is @TempList}
}
#SHOW {Test: You notice longsword, shortsword and shield.} |
|
|
|
|
|