compile errors - 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: compile errors (
/showthread.php?tid=528307)
compile errors -
jackx3rx - 27.07.2014
I made my own /acheck command which shows the admin the players IP, ping, sampversion, location, vw, int etc etc..
But upon compiling I have four errors, here is my command:
Код:
CMD:acheck(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] < 3) return SendClientMessage(playerid,-1,"{AA3333}ERROR:{FFFFFF} Only administrators may use this command.");
{
new player, playerip, playerping, playerversion, playerint, playervw, Float:playerX, Float:playerY, Float:playerZ, string[128], string2[128];
if (sscanf(params,"u",player)) return SendClientMessage(playerid,-1,"{AA3333}USAGE:{FFFFFF} /acheck (id)");
if (player == INVALID_PLAYER_ID) return SendClientMessage(playerid,-1,"{AA3333}ERROR:{FFFFFF} Player does not exist or is offline.");
GetPlayerIp(player,playerip,sizeof(playerip));
GetPlayerVersion(player,playerversion,sizeof(playerversion);
GetPlayerPos(player,playerX,playerY,playerZ);
playerping = GetPlayerPing(player);
playerint = GetPlayerInterior(player);
playervw = GetPlayerVirtualWorld(player);
format (string,128,"{32CD32}Player:{FFFFFF} %s {32CD32}IP:{FFFFFF} %i {32CD32}Ping:{FFFFFF} %i {32CD32}SAMP Version:{FFFFFF} %i",RemoveUnderScore(player),playerip,playerping,playerversion);
SendClientMessage(playerid,-1,string);
format (string2,128,"{32CD32}Interior:{FFFFFF} %i {32CD32}Virtual World:{FFFFFF} %i {32CD32}X:{FFFFFF} %i {32CD32}Y:{FFFFFF} %i {32CD32}Z:{FFFFFF} %i",playerint,playervw,playerX,playerY,playerZ);
SendClientMessage(playerid,-1,string2);
}
return 1;
}
Here is the errors:
Код:
C:\Users\Jack\Desktop\Vinewood Roleplay\gamemodes\vrp.pwn(588) : error 035: argument type mismatch (argument 2)
C:\Users\Jack\Desktop\Vinewood Roleplay\gamemodes\vrp.pwn(588) : error 035: argument type mismatch (argument 2)
C:\Users\Jack\Desktop\Vinewood Roleplay\gamemodes\vrp.pwn(589) : error 035: argument type mismatch (argument 2)
C:\Users\Jack\Desktop\Vinewood Roleplay\gamemodes\vrp.pwn(589) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
4 Errors.
Lines 588 - 589:
Код:
GetPlayerIp(player,playerip,sizeof(playerip));
GetPlayerVersion(player,playerversion,sizeof(playerversion));
Thanks in advance.
Re: compile errors -
Stinged - 27.07.2014
Change the new ... line to this:
pawn Код:
new player, playerip[16], playerping, playerversion[16], playerint, playervw, Float:playerX, Float:playerY, Float:playerZ, string[128], string2[128];
AW: compile errors -
jackx3rx - 27.07.2014
when I'm IG it says everybodies IP is 50?