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
Sniegov
Beginner


Joined: 17 Oct 2000
Posts: 10
Location: Poland

PostPosted: Tue Jul 23, 2002 4:59 pm   

Where is bug?
 
I have large Db and store there a long names, race and short name and some others.. For exemp:
Imie____|Opis_________|Rasa____|Klan____|Karma
Guffy___|fat green_____|goblin___|_______|chaos
Ferd____|red slim______|ork_____|________|chaos
When string of text is received:
fat green goblin [Guffy]
my trigg works fine.
But when i have something like this:
fat green goblin [Guffy], red slim ork.
it doesn't work. Why?
this my trig:
(%w) (%w) ({@rasy})

szukajdb =0;rasadb =0;szukadb =0;szukajdb = %1 %2;rasadb = %3;szukajdb = %remove("> ",@szukajdb);szukadb = %find(@szukajdb,All,Opis);#IF @szukadb<>%null {#FO @szukadb {#IF @rasadb=%db(%i,Rasa) {@szukadbi = %i};#SU %if(%db(@szukadbi,Imie)<>%null,%ansi(15)%trim(%db(@szukadbi,Opis)) %trim(%db(@szukadbi,Rasa))" "%ansi(10)"["%ansi(15)%word(%db(@szukadbi,Imie),1)%ansi(10)"]"%ansi(),@szukajdb @rasadb)%if(%db(@szukadbi,Karma)<>%null,%ansi(7)" - "%db(@szukadbi,Karma)%ansi())}}

Var rasy: ork|goblin
Snieg.
Reply with quote
TonDiening
GURU


Joined: 26 Jul 2001
Posts: 1958
Location: Canada

PostPosted: Tue Jul 30, 2002 3:24 pm   
 
Most likely as the first #Sub frags the
reparse for the second piece.

..

Maybe with with color word
#TR {{@list}} {#CW yellow}

Beta version has different solutions.

Ton Diening
Reply with quote
zeroz
Newbie


Joined: 27 Jul 2002
Posts: 8
Location: USA

PostPosted: Tue Jul 30, 2002 5:47 pm   
 
I'm not completely sure what exactly you're trying to do. The code you posted looks pretty confusing to me. (Note, I learned the zMUD script language in about 2 hours last night and spent 7 hours writing a complex database script...)

IF I've read it right, and you want it to also read in the 2nd, 3rd, and so-on... you'll have to set up a delimiter check of sorts. Check for the delimiter, maybe even keep track with a variable, then add one to get the total number of things to process. Then use a #while to loop through and read in each string seperately. It's a bit of a work around, and there could be some easier way... or I could have completely missed what you're trying to do.

Just trying to be helpful on a board that helped me SEVERAL times last night!



- Z
Reply with quote
Sniegov
Beginner


Joined: 17 Oct 2000
Posts: 10
Location: Poland

PostPosted: Sat Aug 03, 2002 2:25 pm   
 
re:zeroz Will you show me the easier way?
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