03.03.2017, 17:36
Fixed
The error in console.
the code for the command.
The error in console.
Код:
[debug] Run time error 3: "Stack/heap collision (insufficient stack size)" [debug] Stack pointer (STK) is 0xC3E0FC, heap pointer (HEA) is 0xC3F020 [debug] AMX backtrace: [debug] #0 ???????? in public cmd_applications () from Compile.amx [debug] #1 native CallLocalFunction () [004743b0] from samp-server.exe [debug] #2 ???????? in public OnPlayerCommandText () from Compile.amx
Код:
COMMAND:applications(playerid, params[]) { if(GetPVarInt(playerid, "Admin") >= 1 || IsPlayerAdmin(playerid)) { new str[256]; for(new i = 1; i < MAX_APPLICATIONS; i++) { if(ApplicationInfo[i][SentIn] == 1) { format(str, sizeof(str), "%s\n", ApplicationInfo[i][Name]); } } ShowPlayerDialog(playerid, ApplicationsPick, DIALOG_STYLE_LIST, "Applications", str, "View", "Cancel"); return 1; } else return SendClientMessage(playerid, COLOR_RED, "Server: You do not have permission to use this command."); }