Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Leveload Code mit error #357618
02/07/11 21:54
02/07/11 21:54
Joined: Apr 2005
Posts: 653
Germany
D
Det Offline OP
User
Det  Offline OP
User
D

Joined: Apr 2005
Posts: 653
Germany
Hallo !

Habe hier einen Level Load code wo Wed die Fehlermeldung

text uncleard identifier
<text Missions_txt

Hab im Hanbuch nichts gefunden was den Fehler beheben könnte ich weiß nur das etwas in dem Code fehlt nur nichso genau was

Code:
text Missions_txt
{
     strings = 3; //Number of Levels +1 (3 for are 2 possible Levels)
     string = "";
              "Level1.wmb"; //Names of the Levelfiles (this will be loaded for 1)
              "Level2.wmb"; //this for 2
}

This is the action with its event to load the new level:

function LevelLoad_event()
{
     my.enable_impact = off;

     var LevelNum;
     LevelNum = my.skill1;

     my = NULL;
     you = NULL;

     level_load(Missions_txt[LevelNum]);
     wait(3);
}

//skill1: LevelNumber 1
action Lvl_Change_Run()
{
     my.enable_impact = on;
     my.event = LevelLoad_event;

     my.polygon = on;
     my.fat = off;
     my.narrow = off;

     my.invisible = on;
}
}



Last edited by Det; 02/07/11 22:34.

Wissen ist macht.
Nichts wissen macht auch nichts.

A7.86
Re: Leveload Code mit error [Re: Det] #357625
02/07/11 22:24
02/07/11 22:24
Joined: Apr 2005
Posts: 653
Germany
D
Det Offline OP
User
Det  Offline OP
User
D

Joined: Apr 2005
Posts: 653
Germany
Einen Fehler hab ich jetzt gefunden es muß heißen :



TEXT* Missions_txt
{
strings = 3; //Number of Levels +1 (3 for are 2 possible Levels)
string = "",
"Level1.wmb", //Names of the Levelfiles (this will be loaded for 1)
"Level2.wmb"; //this for 2
}


aber jetzt habe ich noch einen Syntax Error


Wissen ist macht.
Nichts wissen macht auch nichts.

A7.86
Re: Leveload Code mit error [Re: Det] #357626
02/07/11 22:33
02/07/11 22:33
Joined: Jan 2011
Posts: 120
United States
Logan Offline
Member
Logan  Offline
Member

Joined: Jan 2011
Posts: 120
United States
Hi,

I don't speak German, but this line looks wrong to me:
level_load(Missions_txt[LevelNum]);

Because Missions_txt is a TEXT pointer, and you're treating it like an array. I also think that's where your syntax error is coming from. I might be wrong though.

Try:
level_load((Missions_txt.pstring)[LevelNum]);

Re: Leveload Code mit error [Re: Logan] #357627
02/07/11 22:39
02/07/11 22:39
Joined: Apr 2005
Posts: 653
Germany
D
Det Offline OP
User
Det  Offline OP
User
D

Joined: Apr 2005
Posts: 653
Germany
Ok thank you : I tryed it like this level_load((Missions_txt.pstring)[LevelNum]);
but it comes a Syntax Error again the error is in line 4 says the computer (WED)


Wissen ist macht.
Nichts wissen macht auch nichts.

A7.86
Re: Leveload Code mit error [Re: Det] #357630
02/07/11 22:47
02/07/11 22:47
Joined: Jan 2011
Posts: 120
United States
Logan Offline
Member
Logan  Offline
Member

Joined: Jan 2011
Posts: 120
United States
Oh.

Put parentheses here, in the text definition:

string("",
"Level1.wmb", //Names of the Levelfiles (this will be loaded for 1)
"Level2.wmb"); //this for 2

Re: Leveload Code mit error [Re: Logan] #357631
02/07/11 22:49
02/07/11 22:49
Joined: Jan 2011
Posts: 120
United States
Logan Offline
Member
Logan  Offline
Member

Joined: Jan 2011
Posts: 120
United States
And, I think for the sake of good practice, you need to define the text as

TEXT* Missions_txt = {.....

Not simply
TEXT* Missions_txt { .....

Re: Leveload Code mit error [Re: Logan] #357640
02/07/11 23:09
02/07/11 23:09
Joined: Apr 2005
Posts: 653
Germany
D
Det Offline OP
User
Det  Offline OP
User
D

Joined: Apr 2005
Posts: 653
Germany
Now comes the error after changing the other error :

my.enable_impact = off;

is not a member of Enity


Wissen ist macht.
Nichts wissen macht auch nichts.

A7.86
Re: Leveload Code mit error [Re: Det] #357647
02/07/11 23:22
02/07/11 23:22
Joined: Jan 2011
Posts: 120
United States
Logan Offline
Member
Logan  Offline
Member

Joined: Jan 2011
Posts: 120
United States
my.emask &= ~ENABLE_IMPACT;

Lots of little things change with the transition to Lite-C. tongue

EDIT: You're also going to need to change a few of the flag-setting lines in the entity action. The good news is you can condense most of them down to a couple lines.

my.emask |= ENABLE_IMPACT;
set(my,POLYGON | INVISIBLE);
my.eflags &= ~(FAT | NARROW);

Last edited by Logan; 02/07/11 23:28.
Re: Leveload Code mit error [Re: Logan] #357650
02/07/11 23:29
02/07/11 23:29
Joined: Apr 2005
Posts: 653
Germany
D
Det Offline OP
User
Det  Offline OP
User
D

Joined: Apr 2005
Posts: 653
Germany
Now the next error it is an error in the Action

my.enable_impact = on;

is not a meber of Enity


It seems to be a C Script code and not Lite C

Last edited by Det; 02/07/11 23:32.

Wissen ist macht.
Nichts wissen macht auch nichts.

A7.86
Re: Leveload Code mit error [Re: Det] #357651
02/07/11 23:30
02/07/11 23:30
Joined: Jan 2011
Posts: 120
United States
Logan Offline
Member
Logan  Offline
Member

Joined: Jan 2011
Posts: 120
United States
Check my above post again... I edited it about 90 times before I finally got it right.

Page 1 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1