Help with script

Talk about making games.

Help with script

Postby Behdadsoft » Sun Feb 20, 2011 1:33 pm

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.
There is no possible way, if we found will make a way.

http://behdadsoft.com/
*******************************************************************
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0
User avatar
Behdadsoft
 
Posts: 207
Joined: Wed Dec 16, 2009 9:19 pm
Score: 2 Give a positive score

Re: Help with script

Postby schnellboot » Sun Feb 20, 2011 3:55 pm

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
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: Help with script

Postby lcl » Sun Feb 20, 2011 3:57 pm

... level.dat? You can't have variables named like this..
User avatar
lcl
 
Posts: 2339
Joined: Thu Mar 25, 2010 5:55 pm
Location: Finland
Score: 276 Give a positive score

Re: Help with script

Postby again » Sun Feb 20, 2011 4:03 pm

lcl wrote:... level.dat? You can't have variables named like this..


LOL :lol:
Free windows mobile games like doodle jump and super mario bros
http://krenisis.freeforums.org/
again
 
Posts: 258
Joined: Wed Jan 19, 2011 7:06 pm
Score: 33 Give a positive score

Re: Help with script

Postby Behdadsoft » Sun Feb 20, 2011 5:31 pm

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.
There is no possible way, if we found will make a way.

http://behdadsoft.com/
*******************************************************************
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0
User avatar
Behdadsoft
 
Posts: 207
Joined: Wed Dec 16, 2009 9:19 pm
Score: 2 Give a positive score

Re: Help with script

Postby schnellboot » Sun Feb 20, 2011 5:35 pm

Code: Select all
if (level==1)
{
    LoadGame("BDG_ML1.dat");
}


set variable level to 1 when Level.dat is made
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: Help with script

Postby Behdadsoft » Sun Feb 20, 2011 5:50 pm

The script does not work and gives error messages. Line 7 to error if (level == 1) is.

Image
There is no possible way, if we found will make a way.

http://behdadsoft.com/
*******************************************************************
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0
User avatar
Behdadsoft
 
Posts: 207
Joined: Wed Dec 16, 2009 9:19 pm
Score: 2 Give a positive score

Re: Help with script

Postby schnellboot » Sun Feb 20, 2011 5:52 pm

define new variable -> level
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: Help with script

Postby Behdadsoft » Sun Feb 20, 2011 6:10 pm

Scripts were revised, but steps are not loaded. :?
There is no possible way, if we found will make a way.

http://behdadsoft.com/
*******************************************************************
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0
User avatar
Behdadsoft
 
Posts: 207
Joined: Wed Dec 16, 2009 9:19 pm
Score: 2 Give a positive score

Re: Help with script

Postby schnellboot » Sun Feb 20, 2011 6:15 pm

do you have this level=1; after script for creating the Level.dat?
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: Help with script

Postby Behdadsoft » Sun Feb 20, 2011 6:23 pm

I do not understand your question.
There is no possible way, if we found will make a way.

http://behdadsoft.com/
*******************************************************************
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0
User avatar
Behdadsoft
 
Posts: 207
Joined: Wed Dec 16, 2009 9:19 pm
Score: 2 Give a positive score

Re: Help with script

Postby schnellboot » Sun Feb 20, 2011 6:27 pm

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" ?
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: Help with script

Postby Behdadsoft » Sun Feb 20, 2011 6:43 pm

OK.

My code saveVars ("level.dat", "level"); entered in Part view the file sticks running at this level.dat is made.
There is no possible way, if we found will make a way.

http://behdadsoft.com/
*******************************************************************
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0
User avatar
Behdadsoft
 
Posts: 207
Joined: Wed Dec 16, 2009 9:19 pm
Score: 2 Give a positive score

Re: Help with script

Postby schnellboot » Sun Feb 20, 2011 6:48 pm

so you have a variable of save group level and you want to loadGame if this variable is true?
schnellboot
 
Posts: 819
Joined: Sat Mar 31, 2007 1:35 pm
Location: Germany
Score: 102 Give a positive score

Re: Help with script

Postby Behdadsoft » Sun Feb 20, 2011 6:51 pm

Yes :mrgreen:
There is no possible way, if we found will make a way.

http://behdadsoft.com/
*******************************************************************
My Game : Star Wars 1.0

http://behdadgame.com/index.php?topic=3.0
User avatar
Behdadsoft
 
Posts: 207
Joined: Wed Dec 16, 2009 9:19 pm
Score: 2 Give a positive score

Next

Return to Game Development

Who is online

Users browsing this forum: No registered users and 1 guest