ZCMD Crashdetect error -
blackeagle1122 - 08.03.2014
Hi,
If I write a command long than 32 characters, crashdetect shows me:
Код:
[23:04:06]
[23:04:18] [debug] Run time error 4: "Array index out of bounds"
[23:04:18] [debug] Accessing element at index 32 past array upper bound 31
[23:04:18] [debug] AMX backtrace:
[23:04:18] [debug] #0 00009f30 in public OnPlayerCommandText (playerid=7, cmdtext[]=@0x0134c7c8 "/sarkihttp://www.youtube.com/watch?...") at C:\....\include\zcmd.inc:94
This happens on doesn't exist commands and returns "Server: Unknown Command", normally it should return SendClientMessage(playerid,-1,"Wrong command!");
Re: ZCMD Crashdetect error -
Avi Raj - 08.03.2014
You are trying to use strcmp and zcmd both the commands.
Convert your command to a single type.
ZCMD or strcmp, i prefer you to change it to zcmd.
Re: ZCMD Crashdetect error -
blackeagle1122 - 08.03.2014
Quote:
Originally Posted by Avi Raj
You are trying to use strcmp and zcmd both the commands.
Convert your command to a single type.
ZCMD or strcmp, i prefer you to change it to zcmd.
|
No, I don't have any strcmp commands. All my commands are ZCMD. But I have anti dialog and anti changing name hack in OnPlayerCommandReceived. It causes ?
Re: ZCMD Crashdetect error -
Avi Raj - 08.03.2014
show your OnPlayerCommandText
Re: ZCMD Crashdetect error -
blackeagle1122 - 08.03.2014
Quote:
Originally Posted by Avi Raj
show your OnPlayerCommandText
|
I don't have OnPlayerCommandText. I have changed it OnPlayerCommandReceived.
pawn Код:
public OnPlayerCommandReceived(playerid, cmdtext[])
{
new ID = GetPlayerDialogID(playerid);
if(ID != -1) return SendClientMessage(playerid,COLOR_ADMIN,"Dialog Hack!"),Kickit(playerid);
return 1;
}
Re: ZCMD Crashdetect error -
Lordzy - 08.03.2014
Quote:
Originally Posted by blackeagle1122
Hi,
If I write a command long than 32 characters, crashdetect shows me:
|
ZCMD passes a callback as command. And callbacks don't support more than 32 characters. Only parameters would be supporting. If that's not the case, show your codes here in relating to that cmd.
Re: ZCMD Crashdetect error -
QuaTTrO - 08.03.2014
zcmd command limit is 32 characters! That means you cant call command that is longer than 32 characters. You can fix it, just open zcmd.inc file find line called:
pawn Код:
#define MAX_FUNC_NAME (32)
And replace it with longer value like:
pawn Код:
#define MAX_FUNC_NAME (64)
But im not sure that will work.
edit: i'm too slow...
Re: ZCMD Crashdetect error -
blackeagle1122 - 08.03.2014
Quote:
Originally Posted by Lordz™
ZCMD passes a callback as command. And callbacks don't support more than 32 characters. Only parameters would be supporting. If that's not the case, show your codes here in relating to that cmd.
|
That happens on doesn't exist commands.
Quote:
Originally Posted by QuaTTrO
zcmd command limit is 32 characters! That means you cant call command that is longer than 32 characters. You can fix it, just open zcmd.inc file find line called:
pawn Код:
#define MAX_FUNC_NAME (32)
And replace it with longer value like:
pawn Код:
#define MAX_FUNC_NAME (64)
But im not sure that will work.
edit: i'm too slow...
|
Solved thanks