Help Me out
#1

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
Reply
#2

I believe you're saving the IP as an integer not a string which you should be doing
Reply
#3

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?
Reply
#4

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);
Reply
#5

Thank, Ryder, im not exactly sure why, but last time i tried that i got a argument warning/error, TYVM
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)