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
wheelman
Novice


Joined: 30 Jan 2006
Posts: 41

PostPosted: Thu Dec 13, 2007 9:07 pm   

#While combined with #IF
 
Code:
#T+ Identify;c 'identify' %1;#DBFIRST;#WHILE (!%null(%rec)) {#IF (@EquipName=&Name) {@EquipExist = 1;#DBNEXT}}
#IF (@EquipExist = "") {RecordAdd} {#T- Identify}


Does anyone know what's wrong with this?
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Thu Dec 13, 2007 9:11 pm   
 
To start with it is doing all the database stuff before your triggers have a chance to capture an identify information. Beyond that I don't see much wrong.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
Guinn
Wizard


Joined: 03 Mar 2001
Posts: 1127
Location: London

PostPosted: Thu Dec 13, 2007 9:14 pm   
 
First line of the #WHILE loop you have @equipexist = 1. I'm guessing it should be equipexist = 1 (the syntax was more lax in zmud)

Code:
#T+ Identify
c 'identify' %1
#DBFIRST
#WHILE (!%null( %rec)) {#IF (@EquipName=&Name) {
    EquipExist = 1
    #DBNEXT
    }}
#IF (@EquipExist = "") {RecordAdd} {#T- Identify}
_________________
CMUD Pro, Windows Vista x64
Core2 Q6600, 4GB RAM, GeForce 8800GT
Because you need it for text... ;)
Reply with quote
wheelman
Novice


Joined: 30 Jan 2006
Posts: 41

PostPosted: Fri Dec 14, 2007 12:47 am   
 
I'm getting an error of unmatched braces, but I don't see any that aren't matched.

Edit: Nevermind got it.
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