How to save datas with your own name?

Non-platform specific questions.

How to save datas with your own name?

Postby regine » Mon Dec 17, 2007 2:29 pm

I want to save some variables in an data, for that you can make your own name and i want to have a function where you can enter the name of this data to reload the vars again.
My project: Packs Adventure
Now finished: Packs Adventure Demo:http://game-editor.com/forum/viewtopic.php?f=4&t=3491
Demo features:
Level 1-3
Leveleditor
Full edition features:
50 Levels
Big Leveleditor
Bonus features
Fighting mode
...and more
regine
 
Posts: 109
Joined: Mon Aug 15, 2005 7:19 pm
Location: Germany
Score: 1 Give a positive score

Re: How to save datas with your own name?

Postby Kalladdolf » Mon Dec 17, 2007 2:44 pm

when you create or edit a variable, there is a button that says "save group".
you click on it and write a name of a group you'd like to save it in.
then when you want to save a variable, in script editor pick the function "saveVars".
then you get to pick which group to save and in which file.
just enter a filename (for example: "variables").
then it will (when the action is executed) create a file (in the same folder as the game) called "variables.dat".
all the variables in this specific group are saved there.
to load the variables, just pick loadVars and pick which group to reload.
don't forget: the .dat file is in the same folder as the game.

hope this helps
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: How to save datas with your own name?

Postby regine » Mon Dec 17, 2007 2:46 pm

Yes, i know, but i want that the user can make a own name for the data it saves.
My project: Packs Adventure
Now finished: Packs Adventure Demo:http://game-editor.com/forum/viewtopic.php?f=4&t=3491
Demo features:
Level 1-3
Leveleditor
Full edition features:
50 Levels
Big Leveleditor
Bonus features
Fighting mode
...and more
regine
 
Posts: 109
Joined: Mon Aug 15, 2005 7:19 pm
Location: Germany
Score: 1 Give a positive score

Re: How to save datas with your own name?

Postby Kalladdolf » Mon Dec 17, 2007 2:48 pm

yeah, like I said: name it like you want...
it can be "variables.dat", or "regine.dat"...
doesn't matter.
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: How to save datas with your own name?

Postby regine » Mon Dec 17, 2007 2:51 pm

no i want something like this:

Example:

User1 wants to save it with the name blabla.dat
User2 wants to save it with the name hello and goodbye.dat
Then the game saves the data from user 1 under the name blabla
and for user2 it saves it with the name hello and goodbye

do you understand now?

i mean that the user can enter a name for the data inside of the game, so that he dont needs to change the script of the game.
My project: Packs Adventure
Now finished: Packs Adventure Demo:http://game-editor.com/forum/viewtopic.php?f=4&t=3491
Demo features:
Level 1-3
Leveleditor
Full edition features:
50 Levels
Big Leveleditor
Bonus features
Fighting mode
...and more
regine
 
Posts: 109
Joined: Mon Aug 15, 2005 7:19 pm
Location: Germany
Score: 1 Give a positive score

Re: How to save datas with your own name?

Postby Kalladdolf » Mon Dec 17, 2007 3:00 pm

so you don't want to enter the data name while programming with GE, but when u are running your GE-made program?
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: How to save datas with your own name?

Postby regine » Mon Dec 17, 2007 3:02 pm

yes
My project: Packs Adventure
Now finished: Packs Adventure Demo:http://game-editor.com/forum/viewtopic.php?f=4&t=3491
Demo features:
Level 1-3
Leveleditor
Full edition features:
50 Levels
Big Leveleditor
Bonus features
Fighting mode
...and more
regine
 
Posts: 109
Joined: Mon Aug 15, 2005 7:19 pm
Location: Germany
Score: 1 Give a positive score

Re: How to save datas with your own name?

Postby Kalladdolf » Mon Dec 17, 2007 3:08 pm

first create a textbox, name it textbox1 (or how u want)
then when it comes to save the vars:
Code: Select all
saveVars(textbox1.text, "myvars");

"myvars" is just the save group.
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: How to save datas with your own name?

Postby regine » Mon Dec 17, 2007 3:09 pm

ok i will try it

thank you very much
My project: Packs Adventure
Now finished: Packs Adventure Demo:http://game-editor.com/forum/viewtopic.php?f=4&t=3491
Demo features:
Level 1-3
Leveleditor
Full edition features:
50 Levels
Big Leveleditor
Bonus features
Fighting mode
...and more
regine
 
Posts: 109
Joined: Mon Aug 15, 2005 7:19 pm
Location: Germany
Score: 1 Give a positive score

Re: How to save datas with your own name?

Postby Kalladdolf » Mon Dec 17, 2007 3:12 pm

no problem.
looks like you want to make your game run with user accounts and stuff?
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: How to save datas with your own name?

Postby regine » Mon Dec 17, 2007 3:19 pm

yes i want to do that, but it doesnt saves anything?
but since i installed Ge 1.3.9 many of my gamedatas dont save anything...

do you know a solution for that problem?

Edit: well, now i made a loading function and it works, but i cant find the data in the windows explorer, but it is important to find the data for me, because at the moment iam doing a level editor.
My project: Packs Adventure
Now finished: Packs Adventure Demo:http://game-editor.com/forum/viewtopic.php?f=4&t=3491
Demo features:
Level 1-3
Leveleditor
Full edition features:
50 Levels
Big Leveleditor
Bonus features
Fighting mode
...and more
regine
 
Posts: 109
Joined: Mon Aug 15, 2005 7:19 pm
Location: Germany
Score: 1 Give a positive score

Re: How to save datas with your own name?

Postby Kalladdolf » Mon Dec 17, 2007 3:31 pm

regine wrote:but since i installed Ge 1.3.9 many of my gamedatas dont save anything...

well, one problem could be, that the file wasn't named correctly in the script editor...
but that sounds odd... maybe there's some bug?
do you think it really it is because of the version 1.3.9?

regine wrote:but i cant find the data in the windows explorer.

huh?
funny... I tried it and it works...
it's always in the same folder as the game file.
but it works correctly? well, that makes sure there is no bug in your code.
did you overwrite something or hidden all the .dat files?
(crazy, but it can happen)
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: How to save datas with your own name?

Postby regine » Mon Dec 17, 2007 3:33 pm

No, i didnt overwrite something and i didnt hid the .dat files
My project: Packs Adventure
Now finished: Packs Adventure Demo:http://game-editor.com/forum/viewtopic.php?f=4&t=3491
Demo features:
Level 1-3
Leveleditor
Full edition features:
50 Levels
Big Leveleditor
Bonus features
Fighting mode
...and more
regine
 
Posts: 109
Joined: Mon Aug 15, 2005 7:19 pm
Location: Germany
Score: 1 Give a positive score

Re: How to save datas with your own name?

Postby Kalladdolf » Mon Dec 17, 2007 3:40 pm

that sounds very, really weird.
just like I said with me it works
(you know, before I post codes, I test them on my test.ged)
User avatar
Kalladdolf
 
Posts: 2427
Joined: Sat Sep 08, 2007 8:22 am
Location: Germany
Score: 120 Give a positive score

Re: How to save datas with your own name?

Postby regine » Mon Dec 17, 2007 3:50 pm

Now, i made some tests more, and the load function always loads the last level i made with this editor, whatever i type into the field.

If i would send you the data, could you look at it? But it will be in German language.
My project: Packs Adventure
Now finished: Packs Adventure Demo:http://game-editor.com/forum/viewtopic.php?f=4&t=3491
Demo features:
Level 1-3
Leveleditor
Full edition features:
50 Levels
Big Leveleditor
Bonus features
Fighting mode
...and more
regine
 
Posts: 109
Joined: Mon Aug 15, 2005 7:19 pm
Location: Germany
Score: 1 Give a positive score

Next

Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron