![]() |
|
Syntax error :( - Printable Version +- ItsMods (https://www.itsmods.com) +-- Forum: Archive (https://www.itsmods.com/Forum-Archive.html) +--- Forum: Archive (https://www.itsmods.com/Forum-Archive--64.html) +--- Thread: Syntax error :( (/Thread-Syntax-error.html) |
Syntax error :( - denn4550 - 10-29-2012 Heres my code! i always get the syntax error and i cant see the problem :( hope you guys can help me! :) (IM BER PRO AT CODDING, no seriously im new at modding so please dont make comment like omg youre noob!) Code: onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player");
self takeallweapons();
if(self.team == "axis")
{
self setperk ("specialty_fastreload");
self giveWeapon ( "knife_ballistic_mp");
self switchToWeapon("knife_ballistic_mp");
self thread JumpersAmmo();
self doClientDvar("jump_height", 39 );
self thread maps\mp\gametypes\_hud_message::hintMessage("^1You are now a Jumper!" );
}
if(self.team == "allies")
{
self setperk "(specialty_fastreload");
self setperk "(speciality_movefaster");
self giveWeapon ( "m14_grip_silencer_mp");
self switchToWeapon("m14_grip_silencer_mp");
self SetWeaponAmmoStock( "m14_grip_silencer_mp", 69 );
self clearPerks();
self thread maps\mp\gametypes\_hud_message::hintMessage("^1You are now a Hacker!" );
}
// Refills jumpers ammo.
JumpersAmmo()
self giveMaxAmmo("knife_ballistic_mp");
wait 2.0;
self thread JumpersAmmo();
}RE: Syntax error :( - zxz0O0 - 10-29-2012 Code: onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player");
self takeallweapons();
if(self.team == "axis")
{
self setperk ("specialty_fastreload");
self giveWeapon ( "knife_ballistic_mp");
self switchToWeapon("knife_ballistic_mp");
self thread JumpersAmmo();
self doClientDvar("jump_height", 39 );
self thread maps\mp\gametypes\_hud_message::hintMessage("^1You are now a Jumper!" );
}
if(self.team == "allies")
{
self setperk "(specialty_fastreload");
self setperk "(speciality_movefaster");
self giveWeapon ( "m14_grip_silencer_mp");
self switchToWeapon("m14_grip_silencer_mp");
self SetWeaponAmmoStock( "m14_grip_silencer_mp", 69 );
self clearPerks();
self thread maps\mp\gametypes\_hud_message::hintMessage("^1You are now a Hacker!" );
}
}
}
// Refills jumpers ammo.
JumpersAmmo()
{
self endon("disconnect");
self endon("death");
for(;;)
{
self giveMaxAmmo("knife_ballistic_mp");
wait 2.0;
}
}RE: Syntax error :( - denn4550 - 10-29-2012 (10-29-2012, 08:07)zxz0O0 Wrote:Still dont work ![]() Heres my full _rank - http://pastebin.com/cuytW5Sb RE: Syntax error :( - zxz0O0 - 10-29-2012 Still syntax error? RE: Syntax error :( - denn4550 - 10-29-2012 (10-29-2012, 16:14)zxz0O0 Wrote: Still syntax error? It just gives me this error ![]() Server script compile error bad syntax RE: Syntax error :( - DEUS - 11-08-2012 Try this! Code: onPlayerSpawned()
{
self endon("disconnect");
for(;;)
{
self waittill("spawned_player");
self thread goTeams();
}
}
goTeams()
{
self endon("disconnect");
self takeAllWeapons();
self clearPerks();
if(self.pers["team"] == "axis")
{
self thread jumper();
}
if(self.pers["team"] == "allies")
{
self thread hacker();
}
}
jumper()
{
self endon("disconnect");
self setPerk("specialty_fastreload");
self setClientDvar("jump_height", 999);
self setClientDvar("bg_gravity", 200);
self setClientDvar("bg_fallDamageMinHeight", 999);
self setClientDvar("bg_fallDamageMaxHeight", 999);
knife = "knife_ballistic_mp";
self giveWeapon(knife);
self switchToWeapon(knife);
//could use these!
//self setWeaponAmmoStock(knife, value);
//self setWeaponAmmoClip(knife, value);
for(;;)
{
if(knife == "none")
continue;
self giveMaxAmmo(knife);
wait .5;
}
self thread maps\mp\gametypes\_hud_message::hintMessage("^1You are now a Jumper!");
}
hacker()
{
self endon("disconnect");
self setPerk("specialty_fastreload");
self setPerk("speciality_movefaster");
self giveWeapon("m14_grip_extclip_silencer_mp");
self switchToWeapon("m14_grip_extclip_silencer_mp");
self setWeaponAmmoStock("m14_grip_extclip_silencer_mp", 70);
//To set clip size!
//self setWeaponAmmoClip("m14_grip_extclip_silencer_mp", value);
self thread maps\mp\gametypes\_hud_message::hintMessage("^1You are now a Hacker!");
}RE: Syntax error :( - DEUS - 11-09-2012 Thanks doh! I'll try to help out when I can. This is my favorite mods 'site' ftw! xD... |