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 / In string i want int

Author
Message
matti3
13
Years of Service
User Offline
Joined: 15th Nov 2012
Location:
Posted: 30th Nov 2012 11:58
Why this not work. How i can do this then. I save players data like that what they id is. Example:

Filename$="data/save/company/1/projects/"; id; ".dat";

Why that not work? How i can do that then?

Project "factory"
Jambo B
16
Years of Service
User Offline
Joined: 17th Sep 2009
Location: The Pit
Posted: 30th Nov 2012 18:14
How about:

Filename$ = "data\save\company\1\projects\" + str$(id) + ".dat"

Assuming, of course, that id is an integer.

Also, are you sure that the current directory is set correctly?

HTH,

James
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 30th Nov 2012 23:05
Hi Jambo... Not seen you around for a while...

Yes ehat Jambo said should work fine...

Sergey K
22
Years of Service
User Offline
Joined: 4th Jan 2004
Location:
Posted: 30th Nov 2012 23:56
str$() converts Integer to String
val() converts string to integer..

how simple is that? >_<

Advanced Updater for your games!
MrValentine
AGK Backer
15
Years of Service
User Offline
Joined: 5th Dec 2010
Playing: FFVII
Posted: 1st Dec 2012 00:22
Sergey K, We you haha, I never got familiar with val()... might look back at the basics again...

Login to post a reply

Server time is: 2026-07-07 11:21:20
Your offset time is: 2026-07-07 11:21:20