Ambelghan Novice
Joined: 04 Apr 2010 Posts: 49
|
Posted: 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. |
|