Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Math problem- adding and replacing the before value

Author
Message
Explosm69
15
Years of Service
User Offline
Joined: 22nd Jul 2010
Location:
Posted: 6th Oct 2010 04:11
I got a little problem, adding. No its not that i don't know how, its that im doing a XP type thing that requires adding. Mainly my problem is replacing the value from before.



My other other problem is that, how can you make the XP value range from say 0-100 so that it'll say Pvt. then when the value equals 101 it'll change to Sgt.

Cyanide & Happiness 4 Ever
Neuro Fuzzy
19
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 6th Oct 2010 05:27 Edited at: 6th Oct 2010 05:27
Well, XP$ is a string. If you wanted to add the numeric value of two strings... That would be weird o.O

Also... I'm not really sure why you're using ;
to be honest I didn't even know that was valid code o.O (apparently it is!)

Try something like this:



If you haven't already, look at DBPro help -> principles -> datatypes and variables
[edit]
actually that whole "principles" section is pretty important.

Explosm69
15
Years of Service
User Offline
Joined: 22nd Jul 2010
Location:
Posted: 6th Oct 2010 07:55 Edited at: 6th Oct 2010 07:57
Thanks , ps ; was the only thing i learned.

the way i learned was just by looking at the command functions, no tutorial. they use ; alot. it seem easier to me because i also work on FPSC and scripting is easy yet you have to use ; & : alot

Cyanide & Happiness 4 Ever

Login to post a reply

Server time is: 2026-07-22 03:51:35
Your offset time is: 2026-07-22 03:51:35