08.08.2016, 14:56
Hello. I was training to create random commands & functions.
I get a strange error.
There is the commands:
The command doesnt't work well:
- Logs with the second line:
- Crash detect logs:
- Without:
BUT there is no crash detect logs.
Thanks for your help.
I get a strange error.
There is the commands:
PHP Code:
CMD:error(playerid)
{
ErrorMessage(playerid, "Testing - Name : %s - Level : %i", GetName(playerid), GetPlayerScore(playerid));
ErrorMessage(playerid, "Blabla"); // -> This line make the command return 0
ErrorMessage(playerid, "Hi' - Money: %i", GetPlayerMoney(playerid));
return 1;
}
ErrorMessage(playerid, const msg[], va_args<>)
{
new string[200];
format(string, sizeof(string), "[Erreur] "RED_U"%s", msg);
va_format(string, sizeof(string), string, va_start<3>);
return SendClientMessage(playerid, REDF, string);
}
GetName(playerid)
{
static str[MAX_PLAYER_NAME];
GetPlayerName(playerid, str, sizeof(str));
return str;
}
- Logs with the second line:
Code:
[16:49:37] [Erreur] {FF0000}Testing - Nom : cJina_Sawyers - Level : [16:49:37] Server: Unknown Command
Code:
[16:49:37] [debug] Run time error 5: "Invalid memory access" [16:49:37] [debug] AMX backtrace: [16:49:37] [debug] #0 00013b58 in ?? (0, 42720) from testing.amx [16:49:37] [debug] #1 00013a58 in public cmd_error (0, 43596) from testing.amx [16:49:37] [debug] #2 native CallLocalFunction () from samp-server.exe [16:49:37] [debug] #3 00013b58 in ?? (0, 42720) from testing.amx [16:49:37] [debug] #4 00013a58 in public OnPlayerCommandText (0, 43596) from testing.amx
Code:
[16:52:13] [Erreur] {FF0000}Testing - Nom : cJina_Sawyers - Level : [16:52:13] [Erreur] {FF0000}Hi' - Money:
Thanks for your help.

Friendly, Dayrion.