Jump to content
  • 0

pomoc Problém "Symbol is never used"


SteveXtreme

Dotaz

Dobrý den,jsem pawno začátečník a při tvoření jednoduchých FS jsem často narazil na problém,že compiler mi napíše: symbol is never used.Kámoš "DeLeTe" mi často s Pawnem pomáhá,ale momentálně je off,tak kdyby mi někdo vysvětlil,co to znamená.

Čistý kód:

 

#include <a_samp>

#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1

dcmd(antihack,8,cmdtext)

dcmd_antihack(playerid,params[])

{

SendClientMessage(playerid,0x0000BBAA,"Tento antihack je fake!"

}

return 1;

}

 

Chybový výpis (celý):

C:\Users\SteveXtreme\Desktop\Antihack.pwn(3) : error 010: invalid function or declaration

C:\Users\SteveXtreme\Desktop\Antihack.pwn(4) : error 010: invalid function or declaration

C:\Users\SteveXtreme\Desktop\Antihack.pwn(4 -- 10) : warning 203: symbol is never used: "dcmd_antihack"

Může mi někdo pomoct,popř. opravit kód?

Díky,SteveX.

Link to comment
Share on other sites

2 odpovědí na tuto otázku

Recommended Posts

  • 0
#include <a_samp>
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
public OnPlayerCommandText(playerid, cmdtext[])
{
dcmd(antihack,8,cmdtext);
return 0;
}
dcmd_antihack(playerid,params[])
{
#pragma unused params
SendClientMessage(playerid,0x0000BBAA,"Tento antihack je fake!");
return 1;
}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...