SA-MP Forums Archive
Reading from ini, not working... - 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: Reading from ini, not working... (/showthread.php?tid=71586)



Reading from ini, not working... - Robbin237 - 02.04.2009

I can get the IP of the user connected, but then im trying to get the IP from my ini file...
In my ini file i have:
Decysen=127.0.0.1

But i cant get my script working...

I have this on the top of my script:

pawn Код:
// *** IP Verification *** //
new IP[MAX_PLAYERS];
new INI[MAX_PLAYERS];
Then this in OnPlayerConnect:

pawn Код:
GetPlayerName(playerid, Name, sizeof(Name));
GetPlayerIp(playerid, IP, sizeof(IP));
INI[playerid] = dini_Get("DCLogin/IPs.ini", Name);
   
printf("IP: %s |-| INI: %s", IP[playerid], INI[playerid]);
Here's the error:

pawn Код:
D:\_Spellen\bkp\filterscripts\dcadmin.pwn(924) : error 006: must be assigned to an array
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
This is the error line:

pawn Код:
INI[playerid] = dini_Get("DCLogin/IPs.ini", Name);
Can somebody please help me?
Thnx!