Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Syntax error :(
#1
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();
}
Reply

#2
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;
}
}
[Image: azuw.jpg]
Reply

#3
(10-29-2012, 08:07)zxz0O0 Wrote:
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;
}
}
Still dont work Sad

Heres my full _rank - http://pastebin.com/cuytW5Sb
Reply

#4
Still syntax error?
[Image: azuw.jpg]
Reply

#5
(10-29-2012, 16:14)zxz0O0 Wrote: Still syntax error?

It just gives me this error Sad
Server script compile error bad syntax
Reply

#6
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!");

}
Reply

#7
Thanks doh! I'll try to help out when I can.
This is my favorite mods 'site' ftw! xD...
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
  Help error when run mod mr.apple 9 6,631 09-24-2013, 21:49
Last Post: Nekochan
  Help improper syntax but i dont know where Brandeeno 6 4,370 07-28-2013, 19:25
Last Post: Brandeeno
  Help COD mw3 Error Couln't load image 3_cursor3:s Paylgs 2 14,280 07-18-2013, 18:46
Last Post: Nekochan
  Mod Error! help please Brandeeno 2 4,055 07-11-2013, 21:06
Last Post: Brandeeno
  Help xkmod error Domino29 2 4,449 07-11-2013, 20:07
Last Post: Brandeeno
  Help mw3 addon error [HARD] Tony. 2 4,468 06-08-2013, 00:32
Last Post: master131
  Help Freaking weird error when starting server!!!! Misterio 5 4,940 04-23-2013, 01:47
Last Post: Misterio
  d3d9 error magnuze 3 4,338 04-09-2013, 14:26
Last Post: NyZzE
  Help Server Script Compile Error when loading ExtremeBunkerMaker lolmoon 3 3,925 04-09-2013, 03:11
Last Post: lolmoon
  error CheGuevara 2 2,923 04-07-2013, 17:39
Last Post: CheGuevara

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.