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.

Newcomers DBPro Corner / Help on variables

Author
Message
Saikoro
20
Years of Service
User Offline
Joined: 6th Oct 2003
Location: California
Posted: 20th Oct 2003 08:58
I was wondering if there was any sort of way at all that you could somehow transfer a changing number variable to a set string variable? Basically, I want the number to be somehow transferred so i can put it in a text command... Sorry if the question sounds stupid. BTW its on DBC, but if u got a DBP code too that will be fine.
-Mathew Larribas

*Currently working on : Untitled RPG
*Working with : Smokiemcpot
*Percent done: .5%
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 20th Oct 2003 09:03
your question is NOT stupid. It is a question ALL programmers have asked-- it's a sign that you are learning...if I understand you correctly the answer is NO.... You cannot alter the variable name once it has been set. If I misunderstood then I apologize.

-RUST-
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Oct 2003 09:51
Yes, it's possible ...

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 20th Oct 2003 16:36
but you can't alter the name of MyString$ from code, I think that's what he was asking...

-RUST-
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 20th Oct 2003 19:20
Nah, he was asking what Ian replied about.

Brains are for idiots.

Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 20th Oct 2003 21:21


-RUST-
Saikoro
20
Years of Service
User Offline
Joined: 6th Oct 2003
Location: California
Posted: 20th Oct 2003 22:08
Thx for your help, not at my pc so i cant try your code at the moment, but Ill get a laptop soon enough

Well there seems to be some confusion on what I am asking. Here is an example of what I could use this for. In an RPG battle, a guy does 12 damage to you. Your health now is reduced by 12. This must be in a text format, or string. I need a code that can do this. I know that you can easily do this and print the numerical variable, but since text only deals with strings, I need the variable to be changed to a string.

Or I could just skip all this if someone knows how to custom the print command to have different fonts, but I dont know if this is possible. Thx
-Mathew Larribas

*Currently working on : Untitled RPG
*Working with : Smokiemcpot
*Percent done: .5%
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Oct 2003 22:58
Yes, you basically want to convert your number into text format, right? That's what's in my first post
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 20th Oct 2003 23:01
Print is not good for graphic games really. Try to use text mostly.

Brains are for idiots.

Athelon XP 1400 Plus - Nvidia Geforce MX400 - 256mb RAM
Saikoro
20
Years of Service
User Offline
Joined: 6th Oct 2003
Location: California
Posted: 21st Oct 2003 08:51
IanM, I tried your code and it works great. THX a bunch it is exactly what I was looking for. Since I got home I used it about 40 times on my different ideas and they work perfect. THX again, I can't believe I forgot about that str$() code...
-Mathew Larribas

*Currently working on : Untitled RPG
*Working with : Smokiemcpot
*Percent done: 6%

Login to post a reply

Server time is: 2024-09-21 05:37:04
Your offset time is: 2024-09-21 05:37:04