Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Xiija
Beginner


Joined: 24 Apr 2018
Posts: 10

PostPosted: Tue Jul 11, 2023 4:51 pm   

database help
 
just looking for a basic example of using a database.
the help files, ... didn't help.

i made a db called magitems with 2 fields.. name & val

i made a simple alias to try and set it.

#echo adding to db...
#addkey magitems name dexterity val 5
#showdb magitems

newp,
thanks for any helps
X.

p.s.
i am trying just adding to a stringlist instead, and its working, but I am not seeing "stored..."
on already stored items, all items show ... "storing new:"



#if (%ismember( %1, @mods)) {#echo stored..} {
#echo storing new:
#ADDITEM mods {%1}
}
Reply with quote
shalimar
GURU


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

PostPosted: Tue Jul 11, 2023 7:36 pm   
 
Simple syntax error, you did not properly reference the variable to display it.

#SHOWDB @magitems


You you have recently installed on a new system, you may need to run CMUD as an administrator to give in permission to save changes to variables.
_________________
Discord: Shalimarwildcat
Reply with quote
kevin498
Newbie


Joined: 11 Apr 2024
Posts: 1

PostPosted: Thu Apr 11, 2024 10:12 am   
 
A really good post, very thankful and hopeful that you will write many more posts like this one.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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 Wolfpaw.net