Post: this is giving me a overflow, i dont know why! please helpppp
04-19-2015, 03:58 AM #1
(adsbygoogle = window.adsbygoogle || []).push({}); nevermind
(adsbygoogle = window.adsbygoogle || []).push({});
04-19-2015, 04:46 AM #2
got scamed
04-19-2015, 05:12 AM #3
jwm614
NextGenUpdate Elite
Originally posted by Jekythegod View Post
    /*
* Black Ops 2 - GSC Studio by iMCSx
*
* Creator : Ketsugan
* Project : teste donac()
* Mode : Multiplayer
* Date : 2015/04/15 - 13:13:36
*
*/
#include maps\mp\_utility;
#include common_scripts\utility;
#include maps\mp\gametypes\_hud_util;
#include maps\mp\gametypes\_hud_message;



init()
{
level thread onPlayerConnect();
}

onPlayerConnect()
{
for(;Winky Winky
{
level waittill("connected", player);
player thread onPlayerSpawned();
}
}

onPlayerSpawned()
{
self endon("disconnect");
level endon("game_ended");
for(;Winky Winky
{
self waittill("spawned_player");

// Will appear each time when the player spawn, that's just an exemple.
self iprintln("do nac test");

self.getpw = false;
self.getsw = false;
self.npr = false;

self thread donac();
}
}

donac() {

self endon("death");
self endon("disconnect");
for(;Winky Winky {
if(!self.npr) { //selecting weapons
if(!self.getpw) {
if(self actionSlotThreeButtonPressed()) {

Primaryname = self getCurrentWeapon();
self iPrintLnBold("^6#1: " + Primaryname);
self.getpw = true;
}
}
if(!self.getsw && self.getpw) {
if(self actionSlotThreeButtonPressed()) {

Secondname = self getCurrentWeapon();
self iPrintLnBold("^6#2: " + Secondname);
self.getsw = true;
}
}
if(self.getpw && self.getsw)
self.npr = true;
}
else { //insta
if (self actionSlotThreeButtonPressed()) {

currentWeapon = self getCurrentWeapon();

if (currentWeapon == Primaryname)
self vainac(Primaryname, Secondname);

else if (currentWeapon == Secondname)
self vainac(Secondname, Primaryname);

wait 0.1;
}
}
}
}

vainac(weapa, weapb) {

amcl = self getWeaponAmmoClip(weapa);
amst = self getWeaponAmmoStock(weapa);
self takeweapon(weapa);

self switchToWeapon(weapb);
wait 0.05;
self giveWeapon(weapa);

self setWeaponAmmoClip(weapa, amcl);
self setWeaponAmmoStock(weapa, amst);

}


theres no way it can give you overflow your not setting text

The following user thanked jwm614 for this useful post:

Exelo
04-19-2015, 04:16 PM #4
Exelo
Banned
Hello.
You're using a "loop" without any breaks.
That way, it's cause a freeze or a crash.

    
donac()
{
self endon("death");
self endon("disconnect");
for(;Winky Winky
{
if(!self.npr)
{ //selecting weapons
if(!self.getpw)
{
if(self actionSlotThreeButtonPressed())
{

Primaryname = self getCurrentWeapon();
self iPrintLnBold("^6#1: " + Primaryname);
self.getpw = true;
}
}
if(!self.getsw && self.getpw)
{
if(self actionSlotThreeButtonPressed())
{

Secondname = self getCurrentWeapon();
self iPrintLnBold("^6#2: " + Secondname);
self.getsw = true;
}
}
if(self.getpw && self.getsw)
self.npr = true;
}
else
{ //insta
if (self actionSlotThreeButtonPressed())
{

currentWeapon = self getCurrentWeapon();

if (currentWeapon == Primaryname)
self vainac(Primaryname, Secondname);

else if (currentWeapon == Secondname)
self vainac(Secondname, Primaryname);

wait 0.1;
}
}
wait .05;
}
}


Change your default scripts for this one.

It's work fine :
You must login or register to view this content.

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo