[DGD] parse_string

chris . psych_mayo at hotmail.com
Mon Feb 19 10:57:22 CET 2007


I have 2 questions.  First, I am trying to make what should be a real easy 
auto-fun.  It would check to see if str2 contains str.  If yes return 1, if 
no return 0.  I am getting an error, and would like to know where i am going 
wrong (aside from not understanding compiler-ish).
Here is my fun:

int searchstr(string str,string str2) {
     if(!parse_string("match = /"+str+"/  check: match",str2) )
          return 0;
     return 1;
     }

So that i gain the most, here is my flawed logic:
match = /"+str+"/  filters through str2, and only captures matches for str
check: match   Parse string is successful if there is a 'match'.

Now i must look like a real fool now, but i must say, i know my lpc well, 
but am having trouble so much as getting an initial understanding of the 
special grammar that goes with the parse_string function.

My second question: This stuff seems like it can go pretty deep, and it 
would take a lot of effort for me to get out in the deep end.  I am not 
seeing myself writing complex parsers for player input.  Should I bother 
myself to pick up a textbook on compiler-ish, or in my situation does the 
effort outweigh the benefits?

Thanks
Chris Conner

_________________________________________________________________
With tax season right around the corner, make sure to follow these few 
simple tips. 
http://articles.moneycentral.msn.com/Taxes/PreparationTips/PreparationTips.aspx?icid=HMFebtagline




More information about the DGD mailing list