please help i cant see whats wrong with this script
Posted: October 14th, 2007, 4:51 pm
i cant see whats wrong it says script runtime error line 1 and line 55 =[ i marked line 55 for so its easier for you guys to see
PLEASE HELP!!
Code: Select all
main()
{
maps\mp\_load::main();
thread dd_onspawn();
thread glass_break_01();
thread glass_break_02();
thread glass_break_03();
thread glass_break_04();
thread precacheFX();
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";
}
dd_onSpawn()
{
trig = getent("dd_arena_trig","targetname");
for(;;)
{
trig waittill("trigger", other);
other thread xarena_onPlayerSpawned();
wait 0.05;
}
}
xarena_onPlayerSpawned()
{
self takeAllWeapons();
wait 0.05;
}
glass_break_01()
{
glass_01 = getent("glass_01","targetname");
trig_glass_01 = getent("trig_glass_01","targetname");
dmg_01 = 0;
hp_01 = 120; // this is the amount of damage the glass needs to break
while(dmg_01 < hp_01)
{
trig_glass_01 waittill ("damage", idmg); // LINE 55!!!!
dmg_01 += idmg;
if (dmg_01 >= hp_01)
{
glass_01 delete();
trig_glass_01 delete();
}
}
}
glass_break_02()
{
glass_02 = getent("glass_02","targetname");
trig_glass_02 = getent("trig_glass_02","targetname");
dmg_02 = 0;
hp_02 = 120; // this is the amount of damage the glass needs to break
while(dmg_02 < hp_02)
{
trig_glass_02 waittill ("damage", idmg);
dmg_02 += idmg;
if (dmg_02 >= hp_02)
{
glass_02 delete();
trig_glass_02 delete();
}
}
}
glass_break_03()
{
glass_03 = getent("glass_03","targetname");
trig_glass_03 = getent("trig_glass_03","targetname");
dmg_03 = 0;
hp_03 = 120; // this is the amount of damage the glass needs to break
while(dmg_03 < hp_03)
{
trig_glass_03 waittill ("damage", idmg);
dmg_03 += idmg;
if (dmg_03 >= hp_03)
{
glass_03 delete();
trig_glass_03 delete();
}
}
}
glass_break_04()
{
glass_04 = getent("glass_04","targetname");
trig_glass_04 = getent("trig_glass_04","targetname");
dmg_04 = 0;
hp_04 = 120; // this is the amount of damage the glass needs to break
while(dmg_04 < hp_04)
{
trig_glass_04 waittill ("damage", idmg);
dmg_04 += idmg;
if (dmg_04 >= hp_04)
{
glass_04 delete();
trig_glass_04 delete();
}
}
}
precacheFX()
{
level._effect["tigertankexplosion"] = loadfx("fx/explosions/explosion1_nolight.efx");
level._effect["fueltank"] = loadfx("fx/explosions/fueltank_ned.efx");
level._effect["wood_close"] = loadfx ("fx/cannon/wood_close.efx");
level._effect["wood"] = loadfx ("fx/cannon/wood.efx");
level._effect["dust"] = loadfx ("fx/cannon/dust.efx");
level._effect["dirt"] = loadfx ("fx/cannon/dirt.efx");
}