Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
Ambelghan
Novice


Joined: 04 Apr 2010
Posts: 49

PostPosted: Sun Aug 29, 2010 10:27 pm   

#PR not working out for creating a list variable
 
The idea is to issue the command "PPTrainerStart X" if X is a number then I end up with a list variable "ppRoomWalkList" that has the location of X in the first position and the current %roomnum() in the 2nd position.
Code:
<trigger priority="4560" id="456">
  <pattern>PPTrainerStart(*)</pattern>
  <value>ppRoomWalkList = ""
cPPTrainer = 1
ippRoomWalkList = 1
#IF (%1)
{
  ppRoomWalkList = %1
}
{
  #PR ppRoomWalkList "PP destination?"
}
ppRoomWalkList = %additem(%roomnum(),@ppRoomWalkList)
//#IF (@rt < 1) {rt = 1}
//#T+ PPTrainerAlarm</value>
</trigger>
Works fine when X is defined, generating the stringlist with 2 numbers in the correct positions. However, if I wanted to have the option of a prompt asking for a roomnum to move to, [let's say I am standing at %roomnum 4481 and I want to go to 8473] I get:
Code:
<var name="ppRoomWalkList" type="StringList" id="458">
  <value>4481</value>
  <json>[4481]</json>
</var>
and a new variable
Code:
<var name="8473" type="StringList" id="2899">
  <value>4481</value>
  <json>[4481]</json>
</var>
, and I am not sure why.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net