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

Joined: 03 Oct 2005
Posts: 24

PostPosted: Tue Aug 23, 2016 9:13 pm   

Execute commands from a database record
So, I created a database where each line is a combination of runs to a monster. Everytime I run, the command increases the value of a variable that corresponds to the key I am matching.
Everything works fine, except that I can execute aliases from these lines and I can't seem to give variables new values. For example, if I write "mob1=test" @mob1 becomes test.
If I put mob1=test in my database it seems to run the command, I can see that the command is correct with echo but instead I get a typo error from the mud.

So it seems like it doesn't understand it to be a command for the cmud and not the mud that makes it not work. I tried a few t hings but couldn't get it to work.

Ok, I did a little more testing. Made a database record named test with one key which does mob1=123. I run it with %db(@test,1) and it tries to execute mob1=123, but I get a typo alert from the mud. It is like parsing is off when I try to execute it.
I tried with #var {mob1} {123} but I get the same thing there.
Reply with quote

Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Wed Aug 24, 2016 1:16 am   
It is hard to imagine precisely what your database records look like. Please post an exact db record that is supposed to be executed. Once we look at what the client sees we can go from there.
Sic itur ad astra.
Reply with quote

Joined: 04 Aug 2002
Posts: 3542
Location: Pensacola, FL, USA

PostPosted: Wed Aug 24, 2016 1:29 am   
#EXEC {%db(@test, 1)}

or use the full #VAR command syntax instead of the shorthand
Windows 10 Home Premium 64-bit
AMD Phenom II x6 1055T 2.8GHz 16GB
CMUD Pro v3.34
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