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 / How do i convert a string into a value for a simple save system?

Author
Message
aldoro101
9
Years of Service
User Offline
Joined: 27th Apr 2014
Location:
Posted: 27th Apr 2014 23:54
I think this question has been asked a million times before, but I can't help but ask; How do I convert a number value in a string into a variable?
For example; If I have a string that says a$="100", how do I take the number within the string and convert it into a variable?
The reason why I'm wondering is because I am trying to set a string's text equal to a variable, then manipulate the string so that I can save them to a text file, then take the number value from the text file and convert it back into a variable so that I can create a basic save system.
If I can't convert a value within a string, then what are my alternatives to making a simple save system?

Man everybody got aids n' $h1t.
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 27th Apr 2014 23:59
MyValue = Val(MyString$)

aldoro101
9
Years of Service
User Offline
Joined: 27th Apr 2014
Location:
Posted: 28th Apr 2014 00:24
Thanks! It turns out I made a different error than I thought... I know what the val() property (command?) does, but I think the problem I was having didn't involve that.

Man everybody got aids n' $h1t.

Login to post a reply

Server time is: 2023-06-09 06:34:27
Your offset time is: 2023-06-09 06:34:27