Spam lag

by Shorlen

Back to Mechanic's Corner.

Unknown2007-01-14 04:09:58
QUOTE(Zarquan @ Jan 13 2007, 05:13 AM) 372863

I haven't had a problem with #LOOPDB on CMUD, but if you want to execute something (like your %val from the other thread), you need to use #EXEC to force expansion of the command(s).


Zarquan hits it again. BAM!
Elysiana2007-01-14 16:30:55
QUOTE(Zarquan @ Jan 13 2007, 05:13 AM) 372863

I haven't had a problem with #LOOPDB on CMUD, but if you want to execute something (like your %val from the other thread), you need to use #EXEC to force expansion of the command(s).

So how would that work? For instance one of the major reasons I'm not working seriously towards transfering to cmud is that I can't get some of my alchemy scripts to work, and one of the things that I've isolated as not working is this:
CODE
#forall @dbvar {#say %key %val %eval(%val - @anotherdbvar.%key}

I've looked closely at it, and the problem is that the %eval isn't executing correctly. %key and %val each have the correct values, as does @anotherdbvar.%key. Prefixing it with #exec also doesn't do anything to help with this.
Unknown2007-01-14 17:48:28
CODE
#LOOPDB @dbvar {#SAY %key %val %eval({%val - %db(@anotherdbvar, %key)})}


CMUD uses {} for expansion of variables, even in strange places. I'd say that the braces shouldn't be required inside the %eval and that it's a bug, but it does work as I wrote it here.
Elysiana2007-01-14 20:52:24
QUOTE(Zarquan @ Jan 14 2007, 09:48 AM) 373250

CODE
#LOOPDB @dbvar {#SAY %key %val %eval({%val - %db(@anotherdbvar, %key)})}


CMUD uses {} for expansion of variables, even in strange places. I'd say that the braces shouldn't be required inside the %eval and that it's a bug, but it does work as I wrote it here.

Ah, thanks! Now I have no excuse to keep procrastinating transfering things to cmud.