30.01.2016, 08:16
[16:08:28] [debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[16:08:28] [debug] Stack pointer (STK) is 0x298AC14, heap pointer (HEA) is 0x400C888
[16:08:28] [debug] AMX backtrace:
[16:08:28] [debug] #0 00000000 in public cmd_noithat () from vnrpgB.amx
[16:08:28] [debug] #1 native CallLocalFunction () from samp-server.exe
[16:08:28] [debug] #2 00000000 in public OnPlayerCommandText () from vnrpgB.amx
My command:
CMD:noithat(playerid, params[])
{
static
houseid = -1;
if ((houseid = House_Inside(playerid)) != -1 && House_IsOwner(playerid, houseid))
{
new
count = 0,
string[MAX_FURNITURE * 32];
for (new i = 0; i != MAX_FURNITURE; i ++) if (count < MAX_HOUSE_FURNITURE && FurnitureData[i][furnitureExists] && FurnitureData[i][furnitureHouse] == houseid) {
ListedFurniture[playerid][count++] = i;
format(string, sizeof(string), "%s%s (%.2f meters)\n", string, FurnitureData[i][furnitureName], GetPlayerDistanceFromPoint(playerid, FurnitureData[i][furniturePos][0], FurnitureData[i][furniturePos][1], FurnitureData[i][furniturePos][2]));
}
if (count) {
Dialog_Show(playerid, ListedFurniture, DIALOG_STYLE_LIST, "Listed Furniture", string, "Choose", "Cancel");
}
else SendErrorMessage(playerid, "This house doesn't have any furniture spawned.");
}
else SendErrorMessage(playerid, "You are not in range of your house interior.");
return 1;
}
[16:08:28] [debug] Stack pointer (STK) is 0x298AC14, heap pointer (HEA) is 0x400C888
[16:08:28] [debug] AMX backtrace:
[16:08:28] [debug] #0 00000000 in public cmd_noithat () from vnrpgB.amx
[16:08:28] [debug] #1 native CallLocalFunction () from samp-server.exe
[16:08:28] [debug] #2 00000000 in public OnPlayerCommandText () from vnrpgB.amx
My command:
CMD:noithat(playerid, params[])
{
static
houseid = -1;
if ((houseid = House_Inside(playerid)) != -1 && House_IsOwner(playerid, houseid))
{
new
count = 0,
string[MAX_FURNITURE * 32];
for (new i = 0; i != MAX_FURNITURE; i ++) if (count < MAX_HOUSE_FURNITURE && FurnitureData[i][furnitureExists] && FurnitureData[i][furnitureHouse] == houseid) {
ListedFurniture[playerid][count++] = i;
format(string, sizeof(string), "%s%s (%.2f meters)\n", string, FurnitureData[i][furnitureName], GetPlayerDistanceFromPoint(playerid, FurnitureData[i][furniturePos][0], FurnitureData[i][furniturePos][1], FurnitureData[i][furniturePos][2]));
}
if (count) {
Dialog_Show(playerid, ListedFurniture, DIALOG_STYLE_LIST, "Listed Furniture", string, "Choose", "Cancel");
}
else SendErrorMessage(playerid, "This house doesn't have any furniture spawned.");
}
else SendErrorMessage(playerid, "You are not in range of your house interior.");
return 1;
}