>> [!HELP!] Wierd Errors! << - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: >> [!HELP!] Wierd Errors! << (
/showthread.php?tid=106485)
>> [!HELP!] Wierd Errors! << -
cigo - 03.11.2009
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
Re: >> [!HELP!] Wierd Errors! << -
gemadon - 03.11.2009
Why do you need that "new cmd" if OnPlayerCommandText is already aware of what cmdtext is?
Re: >> [!HELP!] Wierd Errors! << -
dice7 - 03.11.2009
Re: >> [!HELP!] Wierd Errors! << -
cigo - 03.11.2009
I already have.
Re: >> [!HELP!] Wierd Errors! << -
MadeMan - 03.11.2009
Can you show on which lines the errors are?
Re: >> [!HELP!] Wierd Errors! << -
cigo - 03.11.2009
i know the reason of errors, one of my commands are wrong.. cuz i commented all onplayercommandtext, and now i have 0 errors!
Re: >> [!HELP!] Wierd Errors! << -
dice7 - 03.11.2009
Quote:
Originally Posted by cigo
I already have.
|
You need to have it on the very top
Re: >> [!HELP!] Wierd Errors! << -
Klutty - 03.11.2009
Look around in your gamemode/filterscript if you have more than 1 OnPlayerCommandText callback. This can be causing the problem, I think.