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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
natural24
Newbie


Joined: 09 Nov 2007
Posts: 8

PostPosted: Thu Nov 15, 2007 4:44 am   

#new question
 
Ok i have 2 fields
Field 1 named Room
Field2 named Area

How would i put something in both fields using a alias for example? I'm not fully understanding the syntax for #new.
Reply with quote
JQuilici
Adept


Joined: 21 Sep 2005
Posts: 250
Location: Austin, TX

PostPosted: Fri Nov 16, 2007 11:17 pm   
 
Assuming roomDB has the right columns defined, something like the following:

Code:
#class RoomArea
#alias addRoomArea {
  #var rec {} {} {RoomArea}
  #dboffline
  #dbload roomDB
  rec.Room = %1
  rec.Area = %2
  #new All rec
  #dbsave
  #dbonline
}
#class 0

Then 'addRoomArea rn an' will create a new record with 'rn' in the Room field and 'an' in the Area field.
_________________
Come visit Mozart Mud...and tell an imm that Aerith sent you!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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