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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Sat Aug 28, 2010 6:30 pm   

[3.23a Pro] Can't view variables set from %gmcp
 
If I view the XML I see that RoomName, RoomNum, etc have their values set. However, if I look at the variable itself with "Type" set to "AutoType", then nothing shows up. If I set the "Type" to "Array" I can also see the variable. Apparently there is some issue with viewing the variables set from the %gmcp variable.

Code:
<class name="RoomData" id="6075">
  <var name="RoomName" usedef="true" id="3337">
    <value>North of Oak Square</value>
    <json>Oak Street paralleling the Great Wall</json>
  </var>
  <var name="RoomExits" type="Record" usedef="true" id="3344">
    <value>ne=516|s=514</value>
    <json>{"s":514,"ne":516}</json>
  </var>
  <var name="RoomNum" id="6062">
    <value>515</value>
    <json>513</json>
  </var>
  <trigger type="GMCP" priority="60760" id="6076">
    <pattern>Room.Info</pattern>
    <value>#var RoomNum %gmcp.Room.Info.num
#var RoomName %gmcp.Room.Info.name
#var RoomZone %gmcp.Room.Info.area
#var RoomEnv %gmcp.Room.Info.environment
#var RoomExits %gmcp.Room.Info.exits</value>
  </trigger>
  <var name="RoomZone" id="6077">
    <value>Ashtan</value>
    <json>Ashtan</json>
  </var>
  <var name="RoomEnv" id="6078">
    <value>Urban</value>
    <json>Urban</json>
  </var>
</class>
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Sat Aug 28, 2010 6:35 pm   
 
Additionally the "json" data differs from the "value" data, with the json being incorrect.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sat Aug 28, 2010 9:10 pm   
 
I'm really not sure what you mean. When I use your trigger on Imperian I can do a

#SHOW @RoomName

and it looks fine. You'll need to give me more details along with a procedure showing how to reproduce this.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Sun Aug 29, 2010 4:40 pm   
 
1) Create a new session for Achaea with GMCP enabled.
2) Enter the session and login.
3) Open the settings and paste in the code above.
4) Execute 'ql' to get the mud to send room information.
5) Open the settings and look at the variables in the editor.

None of the values except for the exits are correct. None are viewable through the settings editor except for the exits (or through the xml). They also don't update correctly if you move to a new room. I don't know how to be more specific about this, it's simply not working right at all.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Aug 30, 2010 1:37 am   
 
What looks to be happening is that the Text tab in the Variable Editor is not being updated when doing something like so:

varname = %gmcp.char.vitals.hp

but is being updated when doing something like this:

varname = %string(%gmcp.char.vitals.hp)

Beyond this lack of Text updating, as far as I can tell the variable seems to otherwise be updating appropriately though perhaps Room and the mapper might have some issues all their own (I was not seeing any issues with JSON/XML showing incorrect data.)
_________________
EDIT: I didn't like my old signature
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Aug 30, 2010 4:07 pm   
 
Yep, it looks like the variable is being set to a JSON value but not a proper string value. I have reproduced the problem and should have it fixed in the next update later today.
Reply with quote
ReedN
Wizard


Joined: 04 Jan 2006
Posts: 1279
Location: Portland, Oregon

PostPosted: Mon Aug 30, 2010 8:18 pm   
 
Why did this work with Imperian and not with Achaea? The GMCP messages should have been identical.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Aug 30, 2010 10:02 pm   
 
Because I screwed up and was doing something a bit differently than your exact script.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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