Warnings!! Please help - 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: Warnings!! Please help (
/showthread.php?tid=495887)
Warnings!! Please help -
wakeuptomer - 19.02.2014
pawn Код:
COMMAND:music(playerid, params[])
{
new string[128],sendername[MAX_PLAYER_NAME];
if(GetPVarInt(playerid, "PlayerLogged") == 0) return SendClientMessage(playerid, COLOR_WHITE, "You must be logged in to use this.");
if(sscanf(params, "s[256]", params)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /music [url]");
if(!strcmp(params, "stop", true, 4))
{
StopAudioStreamForPlayer(playerid);
SendClientMessage(playerid, COLOR_GREEN, " You have stopped the live music.");
return 1;
}
if(GetPVarInt(playerid, "Admin") >= 3)
format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid));
GiveNameSpace(sendername);
format(string, sizeof(string), "%s has started playing a live song. ('/music stop' to stop listening)", sendername);
SendClientMessageToAll(COLOR_LIGHTRED, string);
foreach(Player, i)
{
PlayAudioStreamForPlayer(i, params);
}
return 1;
}
This is making me 2 warnings..
I dont know how to fix it please help me.
warning 204: symbol is assigned a value that is never used: "sendername"
warning 204: symbol is assigned a value that is never used: "string"
Re: Warnings!! Please help -
amirab - 19.02.2014
change sendername to "sendername2"
and change "string" to "string2"