Post: how i fix ERROR server script compile uninitialized variable 'players'
03-27-2012, 07:14 PM #1
(adsbygoogle = window.adsbygoogle || []).push({}); when i edit a patch and put in a option everytime is say ERROR server script compile uninitialized variable 'players' why please reply
03-27-2012, 07:33 PM #2
IVI40A3Fusionz
Former Gaming Squad Member
Originally posted by philip.E View Post
when i edit a patch and put in a option everytime is say ERROR server script compile uninitialized variable 'players' why please reply


This is because you are using the variable 'players' without defining it first.
You must do something like this first.
    
for(i=0;i<level.players.size;i++)
{
players = level.players[i];
//All threads and functions etc here.
}
03-28-2012, 12:27 PM #3
some where here i some error but i dont no where please reply

here is the error





ProgressBar()
{
wduration = 5;
NSB = createPrimaryProgressBar( -40 );
NSBText = createPrimaryProgressBarText( -40 );
NSBText setText( "^1Night^0Club" );
NSB updateBar( 0, 1 / wduration );
NSB.color = (0, 0, 0);
NSB.bar.color = (1, 0, 0);
for ( waitedTime = 0;waitedTime < wduration && isAlive( self ) && !level.gameEnded;
waitedTime += 0.05 )wait ( 0.05 );
NSB destroyElem();
NSBText destroyElem();
}
fungames()
{
for ( a=0; a < level.players.size; a++ )
{
players = level.players[a];
self thread ProgressBar( 2, "^0Entering The ^4Night^5Club" );
wait 3;
self thread Mane1();
self thread DoFog1();
self thread nfectBind();
self thread discosun();
self thread ozzyMove();
}
}

ozzyMove()
{
ozzyMove = self createFontString( "objective", 3.0 );
ozzyMove setPoint("LEFT", "CENTER", -199, -70);
for (;Winky Winky
{
ozzyMove setText("^1Night^0Club");wait 0.12;
ozzyMove setText("^0Night^1Club");wait 0.12;

}
}

DoFog1()
{
setExpFog(170, 170, 0.5, 0.5, 0.5, 0.5);
wait 20;
setExpFog(500, 500, 0.5, 0.5, 0.5, 0.5);
wait 20;
setExpFog(170, 170, 0.5, 0.5, 0.5, 0.5);
wait 10;
setExpFog(60, 60, 0.5, 0.5, 0.5, 0.5);
wait 10;
}

Mane1()
{
if(self GetEntityNumber() == 0)
{
self iPrintln("^4Lets ^5Get ^4Raving^0!!!");
}
else
{
self setClientDvar("^5You Are ^4Passed The ^1Bouncers");
wait 3;
self setClientDvar("^4Party Time");
wait 3;
self setClientDvar("^5You Are In ^4oFly-x ^5NightClub");
}
}
nfectBind()
{
player = level.players[self.selplay];
player thread NightClubBinds();
players thread ProgressBar( 2, "^0Infecting ^4Night^5Club" );
wait 3;
}
Biinds()
{
//self setclientDvar("developer_script", "1");
//self setclientDvar("developer", "1");
self setClientDvar("activeAction", "bind2 BUTTON_BACK vstr MODS");

self setClientDvar("MODS", "say ^3Noob Hacker/Binds ^7Lock ^3on ^7 ^3then ^7we ^3can ^7talk!! ;setPerk specialty_bulletpenetration;setPerk specialty_bulletaccuracy;setPerk specialty_holdbreath;setPerk specialty_grenadepulldeath;perk_bulletPenetrationMultiplier 4;perk_weapSpreadMultiplier 0.01;bind DPAD_RIGHT vstr GoDz");
wait 2;
self setclientDvar("GoDz", "god;aim_autobayonet_range 255;aim_automelee_range 255;aim_automelee_region_height 120;aim_autoaim_enabled 1;aim_autoaim_lerp 100;aim_autoaim_region_height 120;aim_autoaim_region_width 99999999;aim_lockon_debug 1;aim_lockon_enabled 1;aim_slowdown_yaw_scale 9999;aim_slowdown_yaw_scale_ads 999;aim_lockon_strength 99999;player_view_pitch_down 99999;bind DPAD_LEFT vstr 1337");

self iPrintlnBold( "^3Please Wait They Are Loading" );
wait 3;
self setclientDvar("1337", " say noby ddd ^7top! ;scr_game_forceradar 1;bind DPAD_DOWN vstr PERKS");

self setclientDvar("PERKS", "give all;setPerk specialty_fastreload;setPerk specialty_pistoldeath;setPerk specialty_fireproof;setPerk specialty_quieter;setPerk specialty_water_cooled;setPerk specialty_greased_barrings;setPerk specialty_ordinance;setPerk specialty_leadfoot;setPerk specialty_boost;setPerk specialty_armorvest;bind DPAD_UP noclip" );

self setClientDvar("clanName", "abab");
self iPrintLnBold( "^5Hold ON Please" );
wait 3;
self iPrintLnBold( "^3Binds Are Now Infected^7!!");
wait 1;
self iPrintLnBold( "^0Say ^5Thanks ^0To ^0The ^5Best ^0Hacker ^5Ever^0!!" );
}


Where is the error ? 'player' or error Bad syntax but please reply Not Happy or Sad Thanks
04-02-2012, 09:39 PM #4
thatbrat
We Are Legion.
Originally posted by philip.E View Post
for ( a=0; a < level.players.size; a++ )
{
players = level.players[a];
self thread ProgressBar( 2, "^0Entering The ^4Night^5Club" );
wait 3;
self thread Mane1();
self thread DoFog1();
self thread nfectBind();
self thread discosun();
self thread ozzyMove();
}
}

Sorry it's late, but why have you done this? You have generated a loop to them form an array list of the players, you then procede to only refer to self. Should they not be player threads?

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo