|
Risca Beginner
Joined: 19 Nov 2003 Posts: 16 Location: USA
|
Posted: Sun Dec 09, 2007 6:35 pm
loopdb - Limit? |
What I'm doing is attempting to price the following items below with the trigger. I currently have 164 items in my data record variable. I included a short snippet as well. Note: This was working 100% until I tried adding another item.
I was wondering if there's a limit to the looping because I'm trying to add more to my data record variable, but then the whole thing stops working and doesn't price anymore. I could probably create another data record variable unless someone can see a problem or suggests another alternative. Any help is appreciated. Thanks!
Pattern: ^"(%w)(%d)"%s(*)$
Value: #loopdb @StockPrices {#IF ( (%3) = %key) {price %1%2 %val}}
Output:
H:354 M:428 E:1672 W:2040 <eb> ih belt
"belt57573" a midnight-black leather belt
"belt59221" a midnight-black leather belt
"belt191250" a sky blue cord and feather belt
"belt190331" a sky blue cord and feather belt
"belt241971" a belt of golden rings
"belt259522" a dark green braided leather belt
"belt259589" a dark green braided leather belt
StockPrices variable snippet:
a black half-mask=400|a sea-blue velvet cloak=700|a black cowl neck halter shirt=400|baggy black pants=500|a black velvet cloak=700|a purple silk bodice=400|an emerald silk bodice=400|a sheer black ruffled bodice=400| |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sun Dec 09, 2007 6:54 pm |
I don't know of any specific limitation, but there is a much better way:
#IF (%db(@StockPrices,"%3")) {price %1%2 %db(@StockPrices,"%3")} |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
|
|