![](templates/Classic/images/spacer.gif) |
Rogdorsh Newbie
Joined: 04 Mar 2002 Posts: 1
|
Posted: Mon Mar 18, 2002 11:27 am
%replace, @word problem |
Can anyone help? This triggers off:
"You create &tempvar1"
and does:
#echo |@tempvar1|
#VAR tempvar1 %replace( @tempvar1, ".", " ")
#echo |@tempvar1|
#var word6 %word( @tempvar1, 6, " ")
#var word4 %word( @tempvar1, 5, " ")
#var word4 %word( @tempvar1, 4, " ")
#var word3 %word( @tempvar1, 3, " ")
#var word2 %word( @tempvar1, 2, " ")
#var word1 %word( @tempvar1, 1, " ")
#echo |@word1|@word2|@word3|@word4|@word5|@word6|
the point of this is to create a list of words from the output of You create, ie if I load object 234 and the mud echoes to me "You create a brown piece of bacon." I would be able to access a list of words to stat and build an item database.
Thing is it's not reliable. For some reason the above script occasionally fails on the last but 1 word, returning an empty value. Any thoughts??
UPDATE ==> OK we just had a reboot and it works now. *confused* |
|
|
![](templates/Classic/images/spacer.gif) |
Kjata GURU
![](images/avatars/190086853941eff9946d4cf.jpg)
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Mon Mar 18, 2002 1:28 pm |
You assign the fifth word to @word4 and then assign the fourth word to the same variable:
#VAR word4 %word( @tempvar1, 5, " ")
#VAR word4 %word( @tempvar1, 4, " ")
Kjata |
|
|
![](templates/Classic/images/spacer.gif) |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|