Post: Need help with code error
03-27-2018, 03:00 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); i keep getting an error with my unlimited ammo code for bo2 gsc, ive tried a few things and cant figure out why im getting a syntax error.
Here is my code
Originally posted by another user
infiniteAmmo()
{
self endon("disconnect");
self endon("disableInfAmmo");
self.infiniteAmmo = booleanOpposite(self.infiniteAmmo);
self iPrintln(booleanReturnVal(self.infiniteAmmo, "Infinite Ammo: [^1OFF^7]", "Infinite Ammo: [^2ON^7]"));
if(self.infiniteAmmo)
{
for(;: wink : <//Spaced so it doesnt show emoji
{
if(self getCurrentWeapon() != "none")
{
self setWeaponAmmoClip(self getCurrentWeapon(), weaponClipsize(self getCurrentWeapon()));
self giveMaxAmmo(self getCurrentWeapon());
}
if(self getCurrentOffhand() != "none")
{
self giveMaxAmmo(self getCurrentOffhand());
}
wait 0.05;
}
}
else
{
self notify("disableInfAmmo");
}
}
03-27-2018, 09:44 PM #2
e1gh2j6
Pokemon Trainer
infiniteAmmo()
{
self endon("disconnect");
self endon("disableInfAmmo");
self.infiniteAmmo = booleanOpposite(self.infiniteAmmo);
self iPrintln(booleanReturnVal(self.infiniteAmmo, "Infinite Ammo: [^1OFF^7]", "Infinite Ammo: [^2ON^7]"));
if(self.infiniteAmmo)
{
for( ; ; ) //< no space
{
if(self getCurrentWeapon() != "none")
{
self setWeaponAmmoClip(self getCurrentWeapon(), weaponClipsize(self getCurrentWeapon()));
self giveMaxAmmo(self getCurrentWeapon());
}
if(self getCurrentOffhand() != "none")
{
self giveMaxAmmo(self getCurrentOffhand());
}
wait 0.05;
}
}
else
{
self notify("disableInfAmmo");
}
}

Smile
Last edited by e1gh2j6 ; 03-27-2018 at 09:46 PM.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo