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 with saving

Author
Message
ajrm007
17
Years of Service
User Offline
Joined: 27th Nov 2006
Location:
Posted: 27th Nov 2006 21:44
im quite new to this, im making a game like ogame.

my prblem is that i cant save it (i dont know what the script would be)

ive been using this one:



but im not sure what the 'string' bit or the 'float' means.

could somebody help me
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 27th Nov 2006 21:58
You basically write the data from your player to a file. Lets say you want to save the player's name, that would a a string (a string is something that's made from letters, and enclosed between "inverted commas", i.e. "ajrm007" ), you might also want to write the player's positions in the level, that would be a float (a float it a number that can have decimals, like 3.1415926537). You may lastly want to save which level your player is in, that would be an integer (a number that cant have any decimals, i.e. 144, you would say byte when you write this).

So to save:


And to load:


ajrm007
17
Years of Service
User Offline
Joined: 27th Nov 2006
Location:
Posted: 27th Nov 2006 22:04
thanks for that

Login to post a reply

Server time is: 2024-11-27 01:58:03
Your offset time is: 2024-11-27 01:58:03