Help Me out - 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: Help Me out (
/showthread.php?tid=142623)
Help Me out -
[WF]Demon - 19.04.2010
Hey, i got this problem, i have been trying to make a ip saver with dudb, but in my user file it shows up like
ip=9
not sure exactly why... but here is the command i use to test saving
pawn Код:
if(strcmp(cmd, "/smys", true) == 0 || strcmp(cmd, "/savemystats", true) == 0)
{
if (PLAYERLIST_authed[playerid])
{
new pIP[30];
dUserSetINT(PlayerName(playerid)).("money",GetPlayerMoney(playerid));
dUserSetINT(PlayerName(playerid)).("admin",Admin[playerid]);
dUserSetINT(PlayerName(playerid)).("rank",Rank[playerid]);
dUserSetINT(PlayerName(playerid)).("ip",GetPlayerIp(playerid, pIP, sizeof(pIP)));
}
else
{
SendClientMessage(playerid, COLOR_BLUE, "You Must Login Before Using This!(/login)");
}
return 1;
}
someone please tell me why this is happening
Re: Help Me out -
cessil - 19.04.2010
I believe you're saving the IP as an integer not a string which you should be doing
Re: Help Me out -
[WF]Demon - 19.04.2010
i tried formatting it as a string, and set the setint to string (the formatted string) and i get arguments warning (or error) i think num 3, is there any suggestions on how this code should be?
Re: Help Me out -
RyDeR` - 19.04.2010
Like cessil said, an IP is a string not an integer.
_________________________________________________
It should be like this: >>
pawn Код:
new
pIp[16]
;
GetPlayerIp(playerid, pIp, sizeof(pIp));
dUserSet(PlayerName(playerid)).("ip", pIp);
Re: Help Me out -
[WF]Demon - 19.04.2010
Thank, Ryder, im not exactly sure why, but last time i tried that i got a argument warning/error, TYVM