Level does not exists

Started by Cool, Jul 15, 2016, 10:58 AM

Previous topic - Next topic

Cool

hi when i kick some one he got kicked but the console give error here is screen shot

error line 384 =    if( pstats[ player.ID ].Level != 0 )

[RRZ]_Genius

you didn't have level index m8

Rise To Distinction - Join Revolver Rivalz

Cool


Finch Real

My Snipet Showroom

http://pastebin.com/5KKuU5cg

Cool

else if ( cmd == "kick" )
{
    if ( IsAdmin( player, cmd ) ) return 0;
else if ( !text ) MessagePlayer("[Syntax] /" + cmd + " <Nick/ID> <Reason>", player );
                else
                {
         local plr = GetPlayer( GetTok( text, " ", 1 ) );
       if ( !plr ) MessagePlayer("[Error] - Invalid Nick/ID Specified !!", player );
       else
        {
            local reason = GetTok( text, " ", 2, NumTok( text, " " ) );
            if ( reason == null ) reason = "None";
            Kick( plr, player, reason );
                    }
}
     }

Cool

Quote from: Finch Real on Jul 15, 2016, 11:27 AMPost Isadmin function
No need i already tested the cmd without isadmin function same error

Finch Real


We are not here to stole your facking cmd with function don't post fix it your self
My Snipet Showroom

http://pastebin.com/5KKuU5cg

Cool

#7
Quote from: Finch Real on Jul 15, 2016, 11:30 AMWe are not here to stole your facking cmd with function don't post fix it your self
I didnt say you help me noob i was waiting for Some good persons Reply for example KAKAN Why i will ask for help from a noob which says error comes EMessage does not exists
and you stealing passwords how i belive you will not steal my function
Quote from: Stormeus on Sep 28, 2015, 03:17 PM@FinchDon was banned for the above post for suggesting users harvest passwords on their servers and then posting what he claims is Wolf's password on the forum. His post included a Squirrel snippet to facilitate this, and stated that he used it on his own servers.

The password he posted did not match his forum password but was removed in case it was his account password for any VC:MP servers.

I would advise all players to immediately stop playing on any servers operated by or affiliated with him, and if they have played on any such servers to change their passwords.

Servers run by Finch include a VCCNR clone and Battle for Middle Earth.

Finch Real

#8
Things get changed in future
Even you don't know In Start @KAKAN @jayant was asking index emessage does not exist
That's was misunderstanding Because of [VU]Wolf they can even banned me again but i have sented proff to stormeus in past and stupids Even don't know what is happening
My Snipet Showroom

http://pastebin.com/5KKuU5cg

KAKAN

@Hercules, post your onPlayerPart, make sure that you're not setting that array to null before checking the Level.
oh no

Cool

function onPlayerPart( player, reason ){
if( pstats[ player.ID ].Level != 0 ){
pstats[ player.ID ].Update( player, sqliteDB );
}
if (pAway.rawin(oldname[player.ID]))
{
player.Name = ""+oldname[player.ID]+"";
pAway.rawdelete( player.Name );
oldname[player.ID] = null;
}

EchoMessage( ICOL_RED + "[" + player.ID + "] " + player.Name + " left the Server. (" + reason + ")" );
print("** " + player + " has left the game. ( " + reason + " ) at " + GetFullTime() + ".");
local w = pstats[ player.ID ].Lost;
QuerySQL( sqliteDB, format( "UPDATE LMS SET Lost=%i WHERE Name='" + player.Name.tolower() + "'", w ) );
local b = pstats[ player.ID ].Played;
QuerySQL( sqliteDB, format( "UPDATE LMS SET Played=%i WHERE Name='" + player.Name.tolower() + "'", b ) );
local f = pstats[ player.ID ].Wins;
QuerySQL( sqliteDB, format( "UPDATE LMS SET Won=%i WHERE Name='" + player.Name.tolower() + "'", f ) ); 
print( ">> " + player.Name + "'s data saved." );

     if ( pstats[ player.ID ].LMS )
        {
          Message( ">> [#4682B4][Info][#FFFFFF] " + player.Name + " is out of the LMS round." );
          LMSCount--;
          if ( LMSCount == 1 ) CheckEnd2();
        }
if ( pstats[ player.ID ].Team == true )
 {
  local plr = FindPlayer( pstats[ player.ID ].Partner );
  if ( plr ) {
   PrivMessage( plr, "[#4682B4][Info][#FFFFFF] " + player.Name + " left the team." );
   pstats[ plr.ID ].Partner = null;
   pstats[ plr.ID ].Team = false;
  }
  }
  if ( pstats[ player.ID ].raceplayer ) {
 racecount--;
 Message( "[#4682B4][Info][#FFFFFF]" + player.Name + " is out of the race." );
    if ( racecount == 0 ) closerace();
 pstats[ player.ID ].raceplayer = false;
    }
if ( GetPlayers() == 0 && newsTimer.Paused == false )
{
newsTimer.Paused = true;
print("timer paused");
}
if (SpawnwepPlayer[ player.ID ] != null)
{
if(!CheckTableSpawnwep( player )) QuerySQL( sqliteDB, "REPLACE INTO Spawnwep( Nick, Weps ) VALUES ( '" + player.Name + "','"+ SpawnwepPlayer[ player.ID ] + "' ) ");
else QuerySQL( sqliteDB, "UPDATE Spawnwep SET Weps='"+ SpawnwepPlayer[ player.ID ] +"'  WHERE Nick='" + player.Name + "'" );
SpawnwepPlayer[ player.ID ] = null; print( player.Name +"'s Spawnwep Saved!" );
}
IsMuted[ player.ID ] = false;
spree[ player.ID ].End();
spree[ player.ID ] = null;
SaveStats( player );
pstats[ player.ID ] = null;
}

Xmair

Do you have the pstats array? Post your player class here.

Credits to Boystang!

VU Full Member | VCDC 6 Coordinator & Scripter | EG A/D Contributor | Developer of VCCNR | Developer of KTB | Ex-Scripter of EAD

Cool

#12
///  Player Class
class PlayerClass
{
LastUsedIP = "0.0.0.0";
Cash = 0;
Bank = 0;
Kills = 0;
Deaths = 0;
Level = 0;
Registered = false;
Logged = false;
IdBeingEdit = null;
    IsBeingEdited =false;
chat = 0;
Muted = false;
nogoto = false;
hide_admin = false;
PHidden = false;
chat = 0;
loan =  false;
Team = false;
Request = false;
TimeRequest = 0;
Partner = null;
LMS = false;
 Wins = 0;
 Played = 0;
 Lost = 0;
 Bet = null;
  raceplayer = false;
loanammount = 0;

pstats <- array( GetMaxPlayers(), null );

KAKAN

Run this on onPlayerPart and tell me the result:-
foreach( key, val in pstats[ player.ID ] ) print( key + " : " + value );
oh no

Finch Real

Might some error in kick function
My Snipet Showroom

http://pastebin.com/5KKuU5cg