DCMD - error 017: undefined symbol
#1

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
Reply
#2

Bump
Reply
#3

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.
Reply
#4

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)