>> [!HELP!] Wierd Errors! <<
#1

how to fix these errors: ?



Код:
error 029: invalid expression, assumed zero
error 004: function "OnPlayerCommandText" is not implemented
warning 219: local variable "string" shadows a variable at a preceding level
error 017: undefined symbol "cmdtext"
error 017: undefined symbol "cmdtext"
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
fatal error 107: too many error messages on one line
errors are in these lines:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	new giveplayername[MAX_PLAYER_NAME]; //line 2739
	new string[256];
    new idx;
	new cmd[256];
	new tmp[256];
	cmd = strtok(cmdtext, idx);
	new sds[128];
	new playermoney;
	new sendername[MAX_PLAYER_NAME];
	new giveplayer[MAX_PLAYER_NAME];
	new giveplayerid; //moneys2, idx2;
	new moneys;
	new Message[256];
	new gMessage[256];
	new pName[MAX_PLAYER_NAME+1];
	new iName[MAX_PLAYER_NAME+1];
    dcmd(prob, 4, cmdtext); //line 2757
Reply
#2

Why do you need that "new cmd" if OnPlayerCommandText is already aware of what cmdtext is?
Reply
#3

pawn Код:
#include <a_samp>
Reply
#4

I already have.
Reply
#5

Can you show on which lines the errors are?
Reply
#6

i know the reason of errors, one of my commands are wrong.. cuz i commented all onplayercommandtext, and now i have 0 errors!
Reply
#7

Quote:
Originally Posted by cigo
I already have.
You need to have it on the very top
Reply
#8

Look around in your gamemode/filterscript if you have more than 1 OnPlayerCommandText callback. This can be causing the problem, I think.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)