SA-MP Forums Archive
[HELP]2 warnings - 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)
+--- Thread: [HELP]2 warnings (/showthread.php?tid=497740)



[HELP]2 warnings - SpowneR - 28.02.2014

Hello, can you help my?

My code:

Код HTML:
ClearChat(playerid, 8);
    SendClientMessage(playerid, Balta, "• Jūs sėkmingai prisijungėte prie savo paskyros.");
    SendClientMessage(playerid, Balta, "• Prisijūngėte į serverį laikas: %s Jūsų IP:%s", GautiData( ), GetPlayerIpEx ( playerid ));
    SendClientMessage(playerid, Balta, "• Visas serverio komandas rasite paraљė: /komandos");
    SendClientMessage(playerid, Balta, "Sveiki atavykę į RPG.LT serverį");
    SendClientMessage(playerid, Balta, "Informaciją apie savo paskyrą galite suћinoti paraљę /informacija");
    SendClientMessage(playerid, Balta, "Visas perkamas paslaugas rasite paspaudę [Y] klaviљą!");
    ClearChat(playerid, 2);
Warrning:
Код HTML:
C:\Users\EVANAS\Desktop\KURIAMAS PROJÄ–KTAS\gamemodes\RLIFE.pwn(1208) : warning 202: number of arguments does not match definition
C:\Users\EVANAS\Desktop\KURIAMAS PROJÄ–KTAS\gamemodes\RLIFE.pwn(1208) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Warnings.
Код HTML:
Thas warning:    SendClientMessage(playerid, Balta, "• Prisijūngėte į serverį laikas: %s Jūsų IP:%s", GautiData( ), GetPlayerIpEx ( playerid ));



Re: [HELP]2 warnings - Konstantinos - 28.02.2014

SendClientMessage has 3 parameters: playerid, color and text.

Use format to format the message and then send the message to the player.


Re: [HELP]2 warnings - SpowneR - 28.02.2014

Rewritte my code pls, im newbie on script please.


Re: [HELP]2 warnings - Konstantinos - 28.02.2014

pawn Код:
new msg[128];
format(msg, sizeof (msg), "• Prisijūngėte į serverį laikas: %s Jūsų IP:%s", GautiData( ), GetPlayerIpEx ( playerid ));
SendClientMessage(playerid, Balta, msg);
Since you got two warnings, that means that either GautiData or GetPlayerIpEx has different number of arguments.


Re: [HELP]2 warnings - SpowneR - 28.02.2014

Thank you dude.