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
Dyron
Apprentice


Joined: 08 Apr 2004
Posts: 103
Location: USA

PostPosted: Mon Dec 15, 2008 11:41 pm   

DAtabase question
 
I've got a database variable called Skill.. I need to be able to take a skill from that database variable and multiply it by 100..
so lets sa this.. I need to take the spell casting skill from the Skill database and * it by 100.. How would I go about that?
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Dec 16, 2008 2:31 pm   
 
This code includes a double-check that there is actually a skill with that name in the database variable.
Code:
#local $skillname $skillvalue $result
$skillname = "spell casting"
$skillvalue = @skill.$skillname
#if ($skillvalue = "") {$skillvalue = 0}
$result = $skillvalue * 100
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 Wolfpaw.net