DCMD - error 017: undefined 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: DCMD - error 017: undefined symbol (
/showthread.php?tid=322122)
DCMD - error 017: undefined symbol -
Naxix - 29.02.2012
Hello, i have just returned to scripting after a break, but when i was makeing a command with dcmd, i suddenly ran into a problem i couldn't remember haveing before.
I made this command:
Код:
dcmd(showfunds, 9, cmdtext);
Код:
dcmd_showfunds(playerid, params[])
{
#pragma unused params
new msg[128];
if(PlayerInfo[playerid][pAdmin] <= 2) return 0;
else{
format(msg,sizeof(msg),"Bank1 have %d$",BankInfo[bBox1]);
SendClientMessage(playerid,COLOR_GREEN,msg);
format(msg,sizeof(msg),"Bank2 have %d$",BankInfo[bBox2]);
SendClientMessage(playerid,COLOR_GREEN,msg);
return 1;
}
}
But i have this error:
Код:
error 017: undefined symbol "dcmd_showfunds"
On both the defining and the top line of the command, anyone know how to fix it?
Regards Naxix
Re: DCMD - error 017: undefined symbol -
Naxix - 01.03.2012
Bump
Re: DCMD - error 017: undefined symbol -
Mark™ - 01.03.2012
pawn Код:
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
Define the above code at the beggining of your script and recompile.
Re: DCMD - error 017: undefined symbol -
Naxix - 01.03.2012
I already have that on top of my script, that's why i find it wierd, that i would get this error, as i have other commands that actually works.
EDIT: I found the problem, i forgot a bracket in the command above.