|
Space_Pilot Beginner
Joined: 03 Oct 2005 Posts: 24
|
Posted: 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. |
|
|
|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: 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. |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Wed Aug 24, 2016 1:29 am |
try:
#EXEC {%db(@test, 1)}
or use the full #VAR command syntax instead of the shorthand |
|
_________________ Discord: Shalimarwildcat |
|
|
|
|
|