SA-MP Forums Archive
Array index out of bounds - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Array index out of bounds (/showthread.php?tid=625899)



Array index out of bounds - danielpalade - 07.01.2017

-- DELETED --


Respuesta: Array index out of bounds - Whillyrez - 08.01.2017

Try with this.
PHP код:
{
    if(!
IsPlayerConnected(playerid))
    {
//Code
    
}
    else {
//Code
}




Re: Array index out of bounds - saffierr - 08.01.2017

Just do this:
PHP код:
if!IsPlayerConnected()) return // error message
// your code 
Do negative checks instead of posotive checks, I hope you get what I mean.