[SOLVED] variable 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED] variable ERROR (
/showthread.php?tid=150479)
[SOLVED] variable ERROR -
park4bmx - 26.05.2010
I have one Problem
Код:
error 033: array must be indexed (variable "rip")
Re: [HELP] variable ERROR -
Jakku - 26.05.2010
Please post the line where is the error from
Re: [HELP] variable ERROR -
park4bmx - 26.05.2010
This is a part of the Script
pawn Код:
GetPlayerIp(playerid,pip[playerid],16);
rip[playerid] = dini_Int(file,"IP"); /*<<<ERROR IS HERE */
if(strcmp(pip[playerid],rip[playerid]))
Re: [HELP] variable ERROR -
dice7 - 26.05.2010
an IP is a string, so use dini_Get to retrieve it
Re: [HELP] variable ERROR -
park4bmx - 26.05.2010
Ok i will try TY
Re: [HELP] variable ERROR -
park4bmx - 26.05.2010
now i have another ERROR same line
ERROR
Код:
error 047: array sizes do not match, or destination array is too small
ERROR LINE
pawn Код:
GetPlayerIp(playerid,pip[playerid],16);
rip[playerid] = dini_Get(file,"IP"); /*<<<ERROR IS HERE */
if(strcmp(pip[playerid],rip[playerid]))
Re: [HELP] variable ERROR -
¤Adas¤ - 26.05.2010
format(rip[playerid], sizeof(rip[]), dini_Get(file, "IP")); You know?
Re: [HELP] variable ERROR -
dice7 - 26.05.2010
Read the error. It say destination array is to small which means you made the array to small. dini_Get returns a 256 characters long string, so your array needs to have 256 cells. On the other hand, you can just do it like this
pawn Код:
GetPlayerIp(playerid,pip[playerid],16);
if(strcmp(pip[playerid], dini_Get(file,"IP")))
Re: [HELP] variable ERROR -
park4bmx - 26.05.2010
OK. Thanks u BOTH GUYS
Re: [HELP] variable ERROR -
¤Adas¤ - 26.05.2010
no problem. HAND