IP won't show correctly
#1

why the IP shows as: 49 In these codes (defination):
pawn Код:
new ip[16];
    GetPlayerIp(player1, ip, sizeof(ip));
while using it:
pawn Код:
format(string3, sizeof(string3), "More: Muted [%s] | Frozen: [%s] | IP: [%d] | Score: [%d] | Current Warnings: [%d]", MuteType, FreezeType, ip, GetPlayerScore(player1), MaximumWarnings[player1]);
The IP Says: 49, Not the correct ip like: 127.0.0.1

And i am using format for a message and all thing are working, but the IP string doesn't send me the correct player's ip,please help
Reply
#2

ip is string, not Integer

so change %d to %s
Reply
#3

WTF a stupid mistake, thanks for help
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)