|
|
Problem with entity creation error e1513
#133355
06/02/07 22:38
06/02/07 22:38
|
Joined: Jun 2007
Posts: 4
kazam
OP
Guest
|
OP
Guest
Joined: Jun 2007
Posts: 4
|
When i try to create my entity "ent_create("fighter.mdl",temp,red_player)" i get a crash in the function that called "ent_create" but the error is about the first line in "red_player" which is wait(1);
thanks
Zap Pow Zing Clatter Woosh Flutter Ting-ling Flip Zong......... and he's gone just like that
|
|
|
Re: Problem with entity creation error e1513
[Re: kazam]
#133356
06/02/07 22:57
06/02/07 22:57
|
Joined: Apr 2005
Posts: 3,076 Germany, NRW
rvL_eXile

3D Artist
|

3D Artist
Joined: Apr 2005
Posts: 3,076
Germany, NRW
|
Do you have forgotten one Semicolon ( ; ) ??
cYa Sebastian
Tutorials: [Blender]Terrain creation ENG/GER [Blender]Low Poly Tree Modeling [GIMP]Create a Texture for Terrains CLICK HERE
|
|
|
Re: Problem with entity creation error e1513
[Re: rvL_eXile]
#133357
06/02/07 23:07
06/02/07 23:07
|
Joined: Jun 2007
Posts: 4
kazam
OP
Guest
|
OP
Guest
Joined: Jun 2007
Posts: 4
|
nope unfortunately not. That was just a typo in my.post (no syntax check here)
Zap Pow Zing Clatter Woosh Flutter Ting-ling Flip Zong......... and he's gone just like that
|
|
|
Re: Problem with entity creation error e1513
[Re: kazam]
#133358
06/02/07 23:21
06/02/07 23:21
|
Joined: Apr 2005
Posts: 3,076 Germany, NRW
rvL_eXile

3D Artist
|

3D Artist
Joined: Apr 2005
Posts: 3,076
Germany, NRW
|
Which Version do you use? Show ure Script please
cYa Sebastian
Tutorials: [Blender]Terrain creation ENG/GER [Blender]Low Poly Tree Modeling [GIMP]Create a Texture for Terrains CLICK HERE
|
|
|
Re: Problem with entity creation error e1513
[Re: rvL_eXile]
#133359
06/03/07 01:07
06/03/07 01:07
|
Joined: Jun 2007
Posts: 4
kazam
OP
Guest
|
OP
Guest
Joined: Jun 2007
Posts: 4
|
my full game script is over 4000 lines long so i'm only showing you the important stuff. also a lot of code in function main is just repeating so don't be to scared of it Code:
function blue_player(ship_par)//function for the blue ship { wait(1); ///////////////////skills // my.hp = hp_par;//these are now unused // my.torpedos = torpedo_par; // my.damage = damage_par; // my.missles = missle_par; // my.stealth = stealth_par; // my.bombs = bombs_par; my.fuel = 2000;//just setting up basic stats for this ship my.view_mode = 1; my.color = 1; my.ship_num = ship_par; ///////////////flags my.player = on;...
function main() { // video_mode = 7; camera.visible = off; level_load("first_level.wmb"); // load_status(); while(1) { // ENABLE_MOUSE = on; // mouse_pointer = 2; if(player_num == 2)//if the game is going to be two player do the //following { 1_player_view.visible = off; cinamatic.visible = off; camera.visible = off; player_1.visible = on; player_2.visible = on; divider_panel.visible = on;
if(red_ship_num == 1)//the following if clauses are for the two players //to selecting there ships { player_2.x = red_fighter.x; player_2.y = red_fighter.y+100; player_2.z = red_fighter.z; player_2.pan = -90;//face this view at the ship red_fighter.pan += 2; if(key_cur == 1) { wait(8); red_ship_num = 2; } if(key_space == 1) { red_ship_num = 0; sleep(3); ent_create("fighter.mdl",vector(random(20000)-10000,random(20000)-10000,random(20000)-10000),red_player(1)); sleep(3); } } if(blue_ship_num == 1) { player_1.x = blue_fighter.x; player_1.y = blue_fighter.y-100; player_1.z = blue_fighter.z; player_1.pan = 90; blue_fighter.pan += 2; if(joy_5 == on) { wait(8); blue_ship_num = 2; } if(joy_1 == on) { blue_ship_num = 0; sleep(3); ent_create("fighter.mdl",vector(random(20000)-10000,random(20000)-10000,random(20000)-10000),blue_player(1)); sleep(3); } } if(red_ship_num == 2) { player_2.x = red_stealth.x; player_2.y = red_stealth.y+100; player_2.z = red_stealth.z; player_2.pan = -90; red_stealth.pan += 2; if(key_cur == 1) { wait(8); red_ship_num = 3; } if(key_cul == 1) { wait(8); red_ship_num = 1; } if(key_space == 1) { red_ship_num = 0; ent_create("stealth.mdl",vector(random(20000)-10000,random(20000)-10000,random(20000)-10000),red_player(2)); sleep(3); } } if(blue_ship_num == 2) { player_1.x = blue_stealth.x; player_1.y = blue_stealth.y-100; player_1.z = blue_stealth.z; player_1.pan = 90; blue_stealth.pan += 2; if(joy_5 == on) { wait(8); blue_ship_num = 3; } if(joy_4 == on) { wait(8); blue_ship_num = 1; } if(joy_1 == on) { blue_ship_num = 0; ent_create("stealth.mdl",vector(random(20000)-10000,random(20000)-10000,random(20000)-10000),blue_player(2)); sleep(3); } } if(red_ship_num == 3) { player_2.x = red_bomber.x; player_2.y = red_bomber.y+100; player_2.z = red_bomber.z; player_2.pan = -90; red_bomber.pan += 2; if(key_cul == 1) { wait(8); red_ship_num = 2; } if(key_space == 1) { red_ship_num = 0; ent_create("bomber.mdl",vector(random(20000)-10000,random(20000)-10000,random(20000)-10000),red_player(3)); sleep(3); } } if(blue_ship_num == 3) { player_1.x = blue_bomber.x; player_1.y = blue_bomber.y-100; player_1.z = blue_bomber.z; player_1.pan = 90; blue_bomber.pan += 2; if(joy_4 == on) { wait(8); blue_ship_num = 2; } if(joy_1 == on) { blue_ship_num = 0; ent_create("bomber.mdl",vector(random(20000)-10000,random(20000)-10000,random(20000)-10000),blue_player(3)); sleep(3); } } } mouse_mode = 2; mouse_map = mouse; MOUSE_POS.X = POINTER.X; MOUSE_POS.Y = POINTER.Y; wait(1);
} }
Zap Pow Zing Clatter Woosh Flutter Ting-ling Flip Zong......... and he's gone just like that
|
|
|
Re: Problem with entity creation error e1513
[Re: kazam]
#133360
06/03/07 01:33
06/03/07 01:33
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
You're trying to pass a variable to an action, or else you try to assign a function to an entity. Entities can only have actions assigned and therefore it is not allowed to pass parameters. Remove the brackets and the arguments in the ent_create function call. E.g. Code:
ent_create("bomber.mdl",vector(random(20000)-10000,random(20000)-10000,random(20000)-10000),blue_player);
and the other occurences respectively.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: Problem with entity creation error e1513
[Re: Uhrwerk]
#133361
06/03/07 02:16
06/03/07 02:16
|
Joined: Jun 2007
Posts: 4
kazam
OP
Guest
|
OP
Guest
Joined: Jun 2007
Posts: 4
|
Thank you sooooooo much it works great now!!!!!!!! Bryce 
Zap Pow Zing Clatter Woosh Flutter Ting-ling Flip Zong......... and he's gone just like that
|
|
|
|