Page 1 of 1

Script compile error

Posted: October 23rd, 2009, 3:07 pm
by Lennard
I'm having a script compile error for my FX, can anybody take a look and tell me what I did wrong? Thx

Script:
main()
{
maps\mp\_load::main();

game["allies"] = "american";
game["axis"] = "german";

game["american_soldiertype"] = "airborne";
game["american_soldiervariation"] = "normal";
game["german_soldiertype"] = "fallschirmjagergrey";
game["german_soldiervariation"] = "normal";

game["attackers"] = "allies";
game["defenders"] = "axis";

thread building_that_falls_down();
}

building_that_falls_down()
{

1 = loadfx("fx/explosions/mp_bomb.efx");
2 = loadfx("fx/explosions/explosion1_heavy.efx");
3 = loadfx("fx/explosions/pathfinder_explosion.efx");
4 = loadfx("fx/explosions/berlin_explosion.efx");
5 = loadfx("fx/smoke/facade_big.efx");
trigger = getent ("trigger", "targetname"); //the bomb trigger
wall1 = getent ("wall1", "targetname");
wall2 = getent ("wall2", "targetname");
wall3 = getent ("wall3", "targetname");
wall4 = getent ("wall4", "targetname");
wall5 = getent ("wall5", "targetname");
bomb = getent ("wallbomb","targetname");
bomb.trigger = getent (bombtrigger,"targetname");

bomb.trigger waittill ("trigger");

earthquake( 0.3, 3, self.origin, 850 );
playfx(1, wall3.origin);
playfx(2, wall3.origin);
playfx(3, wall3.origin);
playfx(4, wall3.origin);
playfx(5, wall3.origin);
wall1 moveZ (-300, 1);
wait 0.35; //negative value coz of falling down, 1 is time. use any values.
wall2 moveZ (-300, 1);
wait 0.35;
wall3 moveZ (-300, 1);
wait 0.35;
wall4 moveZ (-300, 1);
wait 0.35;
wall5 moveZ (-300, 1);
wait 0.35;
}
Thx alot!

Re: Script compile error

Posted: October 23rd, 2009, 3:14 pm
by waywaaaard
try this I think your variables aren't allowed to start with a digit or consist only of 1 digit

Code: Select all

main()
{
maps\mp\_load::main();

game["allies"] = "american";
game["axis"] = "german";

game["american_soldiertype"] = "airborne";
game["american_soldiervariation"] = "normal";
game["german_soldiertype"] = "fallschirmjagergrey";
game["german_soldiervariation"] = "normal";

game["attackers"] = "allies";
game["defenders"] = "axis";

thread building_that_falls_down();
}

building_that_falls_down()
{

fx1 = loadfx("fx/explosions/mp_bomb.efx");
fx2 = loadfx("fx/explosions/explosion1_heavy.efx");
fx3 = loadfx("fx/explosions/pathfinder_explosion.efx");
fx4 = loadfx("fx/explosions/berlin_explosion.efx");
fx5 = loadfx("fx/smoke/facade_big.efx");
trigger = getent ("trigger", "targetname"); //the bomb trigger
wall1 = getent ("wall1", "targetname");
wall2 = getent ("wall2", "targetname");
wall3 = getent ("wall3", "targetname");
wall4 = getent ("wall4", "targetname");
wall5 = getent ("wall5", "targetname");
bomb = getent ("wallbomb","targetname");
bomb.trigger = getent (bombtrigger,"targetname");

bomb.trigger waittill ("trigger");

earthquake( 0.3, 3, self.origin, 850 );
playfx(fx1, wall3.origin);
playfx(fx2, wall3.origin);
playfx(fx3, wall3.origin);
playfx(fx4, wall3.origin);
playfx(fx5, wall3.origin);
wall1 moveZ (-300, 1);
wait 0.35; //negative value coz of falling down, 1 is time. use any values.
wall2 moveZ (-300, 1);
wait 0.35;
wall3 moveZ (-300, 1);
wait 0.35;
wall4 moveZ (-300, 1);
wait 0.35;
wall5 moveZ (-300, 1);
wait 0.35;
}

Re: Script compile error

Posted: October 23rd, 2009, 6:22 pm
by Nightmare
Lev!athan wrote:try this I think your variables aren't allowed to start with a digit or consist only of 1 digit
Correct.

Re: Script compile error

Posted: October 24th, 2009, 3:17 pm
by Lennard
Yep, it works now! Thanks alot!