Page 1 of 3

Help with script

PostPosted: Sun Feb 20, 2011 1:33 pm
by Behdadsoft
hi .
I've written a script file if desired there is another file to be loaded.
I do not know scripting, and I know that my work is bug, why you may modify the script to me.


Code: Select all
if (Level.dat)
{
    LoadGame("BDG_ML1.dat");
}


level.dat a variable that runs when the game is made.

THANKS A LOT.

Re: Help with script

PostPosted: Sun Feb 20, 2011 3:55 pm
by schnellboot
Code: Select all
if (Level.dat==1) //maybe this?
{
    LoadGame("BDG_ML1.dat");
}

let us know what the variable Level.dat is for then I can give you better help

Re: Help with script

PostPosted: Sun Feb 20, 2011 3:57 pm
by lcl
... level.dat? You can't have variables named like this..

Re: Help with script

PostPosted: Sun Feb 20, 2011 4:03 pm
by again
lcl wrote:... level.dat? You can't have variables named like this..


LOL :lol:

Re: Help with script

PostPosted: Sun Feb 20, 2011 5:31 pm
by Behdadsoft
I define a variable called level I have a running game Level.dat is made.
I have a button embedded in the game menu, which I will check if the Level.dat exist desired stage is loaded.

Re: Help with script

PostPosted: Sun Feb 20, 2011 5:35 pm
by schnellboot
Code: Select all
if (level==1)
{
    LoadGame("BDG_ML1.dat");
}


set variable level to 1 when Level.dat is made

Re: Help with script

PostPosted: Sun Feb 20, 2011 5:50 pm
by Behdadsoft
The script does not work and gives error messages. Line 7 to error if (level == 1) is.

Image

Re: Help with script

PostPosted: Sun Feb 20, 2011 5:52 pm
by schnellboot
define new variable -> level

Re: Help with script

PostPosted: Sun Feb 20, 2011 6:10 pm
by Behdadsoft
Scripts were revised, but steps are not loaded. :?

Re: Help with script

PostPosted: Sun Feb 20, 2011 6:15 pm
by schnellboot
do you have this level=1; after script for creating the Level.dat?

Re: Help with script

PostPosted: Sun Feb 20, 2011 6:23 pm
by Behdadsoft
I do not understand your question.

Re: Help with script

PostPosted: Sun Feb 20, 2011 6:27 pm
by schnellboot
Behdadsoft wrote:I define a variable called level I have a running game Level.dat is made.

1.you said you have a variable called level but it was not defined?
2.what do you mean with "I have a running game Level.dat is made" ?

Re: Help with script

PostPosted: Sun Feb 20, 2011 6:43 pm
by Behdadsoft
OK.

My code saveVars ("level.dat", "level"); entered in Part view the file sticks running at this level.dat is made.

Re: Help with script

PostPosted: Sun Feb 20, 2011 6:48 pm
by schnellboot
so you have a variable of save group level and you want to loadGame if this variable is true?

Re: Help with script

PostPosted: Sun Feb 20, 2011 6:51 pm
by Behdadsoft
Yes :mrgreen: