SA-MP Forums Archive
Error. - 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: Error. (/showthread.php?tid=581830)



Error. - PepsiCola23 - 15.07.2015

Im trying to make an anti teleport hack for anticheat.It works but even if a player si logged in it shows the WARNING.I wanted to put a condition to show the message only if the player is logged in.i Tried,but i now i get :

error:
PHP код:
error 028invalid subscript (not an array or too many subscripts): "IsLoggedIn"
(4396) : warning 215expression has no effect
(4396) : error 001expected token";"but found "]"
error 029invalid expressionassumed zero
fatal error 107too many error messages on one line 
All on same line: 4396 :

PHP код:
if((distanta[i] > 65.0) && IsLoggedIn[i] != true// IsLoggedIn 
i tried with
PHP код:
 if((distanta[i] > 65.0) && (IsLoggedIn[i] != true)) 
// IsLoggedIn
still not working


Re: Error. - youssefehab500 - 15.07.2015

You need to define it after the player is logged in/registered.


Re: Error. - PepsiCola23 - 15.07.2015

On other commands,the IsLoggedIn works.


Re: Error. - youssefehab500 - 15.07.2015

Show me how it is being used in other commands.

Edit:
PHP код:
if(distanta[i] > 65.0 && IsLoggedIn[i] != true
This will do it. Sorry, I was checking it in the wrong way..


Re : Error. - KillerDVX - 16.07.2015

[I]Try changing :

Quote:

if(distanta[i] > 65.0 && IsLoggedIn[i] != true)

To :

Quote:

if(distanta > 65.0 && IsLoggedIn(i) != true)