SA-MP Forums Archive
Symbole Is NEVER USED : [ 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: Symbole Is NEVER USED : [ HELP] (/showthread.php?tid=342188)



Symbole Is NEVER USED : [ HELP] - HaZaRaS™ - 13.05.2012

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

new AdminDuty[MAX_PLAYERS];

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Blank Filterscript by your name here");
    print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

#endif

public OnGameModeExit()
{
    return 1;
}

public OnPlayerConnect(playerid)
{
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    return 1;
}


enum playerinfo
{
p_level,
}
new Player[MAX_PLAYERS][playerinfo];

CMD:onduty(playerid, params[])
{
if(Player[playerid][p_level] >= 1)
{
if(AdminDuty[playerid] == 0)
{
new string[128];
AdminDuty[playerid] = 1;
format(string, sizeof(string),"Admin %s is now onduty!", GetName(playerid));
SendClientMessageToAll(-1, string);
}
else SendClientMessage(playerid, -1,"You are already on duty.");
}
else SendClientMessage(playerid, -1,"You are not an admin.");
return 1;
}

CMD:offduty(playerid, params[])
{
if(Player[playerid][p_level] >= 1)
{
if(AdminDuty[playerid] == 1)
{
new string[128];
AdminDuty[playerid] = 0;
format(string, sizeof(string),"Admin %s is now offduty!", GetName(playerid));
SendClientMessageToAll(-1, string);
}
else SendClientMessage(playerid, -1,"You are already off duty.");
}
else SendClientMessage(playerid, -1,"You are not an admin.");
return 1;
}

stock GetName(playerid)
{
new pname[24];
GetPlayerName(playerid, pname, sizeof(pname));
return pname;
}
i am using this code to crete admin duty but i got the following error
Код:
C:\Users\Hazaras\Desktop\(FINAL)\filterscripts\test.pwn(98) : warning 203: symbol is never used: "offduty"
C:\Users\Hazaras\Desktop\(FINAL)\filterscripts\test.pwn(98) : warning 203: symbol is never used: "onduty"
Can some one please help me ?


Respuesta: Symbole Is NEVER USED : [ HELP] - aNdReSk - 13.05.2012

it means u are just not using it.. not an error. pawno is just reminding u :P


Re: Respuesta: Symbole Is NEVER USED : [ HELP] - HaZaRaS™ - 13.05.2012

Quote:
Originally Posted by aNdReSk
Посмотреть сообщение
it means u are just not using it.. not an error. pawno is just reminding u :P
but i cant compile it :P...what to do n how to fix it ?


Re: Symbole Is NEVER USED : [ HELP] - freddy smyth - 13.05.2012

It's just a warning. Check for the "test.amx" file.


Re: Symbole Is NEVER USED : [ HELP] - HaZaRaS™ - 13.05.2012

Quote:
Originally Posted by freddy smyth
Посмотреть сообщение
It's just a warning. Check for the "test.amx" file.
ok thanks for your help . +1

EDIT : But the command still does'nt work in game becouse it is not compiled !!!


Re: Symbole Is NEVER USED : [ HELP] - freddy smyth - 13.05.2012

By that, I'm guessing it worked after all? :3

Glad to help!


Re: Symbole Is NEVER USED : [ HELP] - James Coral - 13.05.2012

lol you dont have
pawn Код:
#include <zcmd>



Re: Symbole Is NEVER USED : [ HELP] - Ballu Miaa - 13.05.2012

Are you using ZCMD cmd processor or STRCMP? Do you have a coded command?


Re: Symbole Is NEVER USED : [ HELP] - HaZaRaS™ - 13.05.2012

Quote:
Originally Posted by Ballu Miaa
Посмотреть сообщение
Are you using ZCMD cmd processor or STRCMP? Do you have a coded command?
yes i have codded it . and i am using zcmd . and For sure i have the zcmd.inc in my pawno > Include folder !


AW: Re: Symbole Is NEVER USED : [ HELP] - Nero_3D - 13.05.2012

It seems that it doesnt got noticed, so again

Quote:
Originally Posted by James Coral
Посмотреть сообщение
lol you dont have
pawn Код:
#include <zcmd>
Also something like that
pawn Код:
#include <a_samp>
#include <zcmd>

new AdminDuty[MAX_PLAYERS];

main()
{
    print("\n----------------------------------");
    print(" Blank Gamemode by your name here");
    print("----------------------------------\n");
}

// rest of your code after the endif