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/1122:34.
Wissen ist macht. Nichts wissen macht auch nichts.
A7.86
Re: Leveload Code mit error
[Re: Det]
#357625 02/07/1122:2402/07/1122:24
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/1122:3302/07/1122:33
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.
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/1122:4702/07/1122:47
Lots of little things change with the transition to Lite-C.
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.