SA-MP Forums Archive
Never used symbol - 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: Never used symbol (/showthread.php?tid=479985)



Never used symbol - lulo356 - 08.12.2013

C:\Users\Davey\Downloads\LuxAdmin.pwn(11213) : warning 203: symbol is never used: "achat"
C:\Users\Davey\Downloads\LuxAdmin.pwn(11213) : warning 203: symbol is never used: "apm"

Quote:

CMD:apm(playerid, params[])
{
new str[128], str2[128], id;
if(sscanf(params,"ds[128]", id, str2)) return SendClientMessage(playerid, red,"USAGE: /apm [id] [message]");
if(IsPlayerConnected(id))
{
if(id != playerid)
{

if(PlayerInfo[playerid][Level] >= 1)
{
format(str, sizeof(str),"Admin PM to [%d]%s: %s", id, PlayerName2(id), str2);
SendClientMessage(playerid, yellow, str);
format(str, sizeof(str),"[PM]Admin: %s", str2);
SendClientMessage(id, COLOR_PINK, str);
PlayerPlaySound(id,1085,0.0,0.0,0.0);
}
else return SendClientMessage(playerid, red,"You are not a high enough level to use this command");
}
else return SendClientMessage(playerid, red,"You cannot PM yourself");
}
else return SendClientMessage(playerid, red,"Player is not connected");
return 1;
}
================================================== ============
// enum:
enum
{
Adminlevel
}
new pInfo [MAX_PLAYERS] [PlayerData];
// CMD:
CMD:achat(playerid, params[])
{
new p2[128], Pna[32];
if(pInfo[playerid] [Adminlevel] < 1) return 0;
if( isnull (params)) return SendClientMessage(playerid, COLOR_RED, "/ac [msg]");
GetPlayerName(playerid, Pna, 32);
if (pInfo [playerid] [AdminLevel] >= 1 || IsPlayerAdmin(playerid))
{
for(new i = 0; i<MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
if(pInfo [i] [Adminlvl] >= 1)
{
format(p2, 128, "Admin %s (%d): %s", Pna, playerid, params);
SendClientMessage(i , -1, p2);
}
}
}
}
return 1;
}

Can somebody help me fix this


Re: Never used symbol - Insulin - 08.12.2013

In the top of the script or maybe somewhere in the script there is written. Use search func() in pawn0
pawn Код:
new achat;
new apm;
Find it and delete it since they are of no use in this script! ZCMD don't require these.


Re: Never used symbol - [WA]iRonan - 08.12.2013

Код:
#pragma unused achat
#pragma unused apm
They hide those warnings, although you should search your script for

Код:
new achat[string];
or
Код:
new apm[string];'



Re: Never used symbol - newbie scripter - 08.12.2013

Answered Above......


Re: Never used symbol - lulo356 - 08.12.2013

Quote:
Originally Posted by [WA]iRonan
Посмотреть сообщение
Код:
#pragma unused achat
#pragma unused apm
They hide those warnings, although you should search your script for

Код:
new achat[string];
or
Код:
new apm[string];'
I have Added the
Quote:

#pragma unused achat
#pragma unused apm

but its not working ig, its says everytime unknow command


Re: Never used symbol - lulo356 - 08.12.2013

Can someone help me?


Re: Never used symbol - Emmet_ - 08.12.2013

Those warnings usually appear when you try to declare ZCMD style commands, but you don't have zcmd included within your script.

pawn Код:
#include <zcmd>



Re: Never used symbol - lulo356 - 08.12.2013

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
Those warnings usually appear when you try to declare ZCMD style commands, but you don't have zcmd included within your script.

pawn Код:
#include <zcmd>
Still not working.


Re: Never used symbol - newbie scripter - 09.12.2013

Change
pawn Код:
enum
{
Adminlevel
}
To:
pawn Код:
enum PlayerData
{
Adminlevel
}