Script compile error

Have questions about CoD/UO mapping that aren't covered in the tutorials section? Post here!

Moderator: Core Staff

Post Reply
Lennard
CJ Wannabe
CJ Wannabe
Posts: 24
Joined: July 22nd, 2009, 3:27 pm

Script compile error

Post by Lennard » October 23rd, 2009, 3:07 pm

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!

User avatar
waywaaaard
Core Staff
Core Staff
Posts: 2214
Joined: February 6th, 2006, 3:18 pm
Location: Germany/Bayern

Re: Script compile error

Post by waywaaaard » October 23rd, 2009, 3:14 pm

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;
}
THAT HANDS WERE NOT TRACED!
visit my blog: Link
Soviet wrote:Yeah, watch out, Peds will hit you with his +5 D-Battleaxe of homosexuality :roll:

User avatar
Nightmare
Core Staff
Core Staff
Posts: 2688
Joined: January 12th, 2006, 10:09 pm
Contact:

Re: Script compile error

Post by Nightmare » October 23rd, 2009, 6:22 pm

Lev!athan wrote:try this I think your variables aren't allowed to start with a digit or consist only of 1 digit
Correct.
Coding is Poetry. Mapping is Art.
"Cause im the sexiest mapper ever...except for nm, that sexy man" - Soviet

-=[CoDJumper.com Movies]=-
[Ambush] || [Backlot] || [Bloc] || [Bog] || [Broadcast] || [Chinatown] || [Countdown]
[Crash] || [Creek] || [Crossfire] || [District] || [Downpour] || [Killhouse] || [Overgrown]
[Pipeline] || [Shipment & Wetwork] || [Showdown] || [Strike] || [Vacant]

Lennard
CJ Wannabe
CJ Wannabe
Posts: 24
Joined: July 22nd, 2009, 3:27 pm

Re: Script compile error

Post by Lennard » October 24th, 2009, 3:17 pm

Yep, it works now! Thanks alot!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest