5 WARRINGS - 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: 5 WARRINGS (
/showthread.php?tid=601580)
5 WARRINGS -
RedRex - 23.02.2016
5 Warrings how to fix it ?!
Код:
C:\Users\Alomari\Desktop\SAMP Server\LVCNR.pwn(361) : warning 209: function "OnPlayerCommandText" should return a value
C:\Users\Alomari\Desktop\SAMP Server\LVCNR.pwn(362) : warning 203: symbol is never used: "armour"
C:\Users\Alomari\Desktop\SAMP Server\LVCNR.pwn(362) : warning 203: symbol is never used: "cuff"
C:\Users\Alomari\Desktop\SAMP Server\LVCNR.pwn(362) : warning 203: symbol is never used: "help"
C:\Users\Alomari\Desktop\SAMP Server\LVCNR.pwn(362) : warning 203: symbol is never used: "rob"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
5 Warnings.[/code]
Код:
CMD:help(playerid, params[])
{
SendClientMessage(playerid, COLOR_RED, "[STATS] /armour");
return 1;
}
Код:
CMD:armour(playerid, params[])
{
SetPlayerArmour(playerid, 100);
return 1;
}
Код:
CMD:cuff(playerid, params[])
{
new pID, targetname[MAX_PLAYER_NAME], name[MAX_PLAYER_NAME], string[128];
if(GetPlayerSkin(playerid) == 288 && 281) // Both IDs are police officer
{
GetPlayerName(pID, targetname, sizeof(targetname));
GetPlayerName(playerid, name, sizeof(name));
if (isnull(params)) return SendClientMessage(playerid, -1, "Usage: /cuff <playerid>");
format(string, sizeof(string), "You have been cuff by Police Officer %s", name);
format(string,sizeof(string), "You have cuff player %s", targetname);
SendClientMessage(pID, -1, string);
SendClientMessage(playerid, -1, string);
TogglePlayerControllable(pID, 0); // Freezes the player. Isn't /cuff in RP, a cmd to freeze?
} else return SendClientMessage(playerid, -1, "You need to have a police skin !");
return 1;
}
Код:
CMD:rob(playerid, params[])
SendClientMessage(playerid, COLOR_RED, "%d robbed you");
How to fix this warrings?
Re: 5 WARRINGS -
Sithis - 23.02.2016
The warnings are very clear. I hope you can read?
Also please stop making topics for every little warning you get. Search and you will find a solution!
Re: 5 WARRINGS -
N0FeaR - 23.02.2016
If u are using zcmd then u should not put these cmd under OnPlayerCommandText.