#1

Код:
D:\Games\GTASAN~2\GODFUC~1\GAMEMO~1\Mode.pwn(3140) : error 033: array must be indexed (variable "dini_Get")
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
line:
Код:
if(dini_Get(file, "IP") == GetPlayerIp(playerid, IP, 16))
Reply
#2

pawn Код:
GetPlayerIp(playerid, IP, 16);
if(strcmp(dini_Get(file, "IP"), IP) == 0)
Reply
#3

Use strcmp.

pawn Код:
GetPlayerIp(playerid, IP, 16);
if(!strcmp(dini_Get(file, "IP"), IP))
Reply
#4

thx... it works but how does strcmp works? can someone explain the code to me?
Reply
#5

Doing

pawn Код:
if(strcmp(dini_Get(file, "IP"), IP) == 0)
actually means

pawn Код:
if(dini_Get(file, "IP") == IP)
but you can't compare strings like that in pawn, you must use strcmp for that.

strcmp is pretty much same as == but used for strings.
Reply
#6

ok, thx!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)