"Stack/heap collision (insufficient stack size)"
#1

EDIT: I fixed it at the top of script with this:

PHP код:
#pragma dynamic 500000 
Hi again, i know... someone know how to fix this?



"Stack/heap collision (insufficient stack size)"


Код:
[debug] #0 ???????? in public cmd_furniture ()
[debug] #1 native CallLocalFunction () [004743b0] from samp-server.exe
[debug] #2 ???????? in public OnPlayerCommandText ()
#define MAX_FURNITURE (2000)

PHP код:
CMD:furniture(playeridparams[])
{
    static
        
houseid = -1;
    if ((
houseid House_Inside(playerid)) != -&& House_IsOwner(playeridhouseid))
    {
        new
            
count 0,
            
string[MAX_FURNITURE 32];
        for (new 
0!= MAX_FURNITURE++) if (count MAX_HOUSE_FURNITURE && FurnitureData[i][furnitureExists] && FurnitureData[i][furnitureHouse] == houseid) {
            
ListedFurniture[playerid][count++] = i;
            
format(stringsizeof(string), "%s%s (%.2f meters)\n"stringFurnitureData[i][furnitureName], GetPlayerDistanceFromPoint(playeridFurnitureData[i][furniturePos][0], FurnitureData[i][furniturePos][1], FurnitureData[i][furniturePos][2]));
        }
        if (
count) {
            
Dialog_Show(playeridListedFurnitureDIALOG_STYLE_LIST"Listed Furniture"string"Select""Anuleaza");
         }
         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;

And

Quote:

[debug] #0 ?? in public OnPlayerText ()
[debug] Run time error 3: "Stack/heap collision (insufficient stack size)"
[debug] Stack pointer (STK) is 0x88A3B4, heap pointer (HEA) is 0x88BB3C
[debug] AMX backtrace:

and when i use CMD:call .. :S

[SPOILER]
PHP код:
CMD:call(playeridparams[])
{
    if (!
Inventory_HasItem(playerid"Cellphone"))
        return 
SendErrorMessage(playerid"You don't have a cellphone on you.");
    if (
PlayerData[playerid][pPhoneOff])
        return 
SendErrorMessage(playerid"Your phone must be powered on.");
    if (
PlayerData[playerid][pHospital] != -|| PlayerData[playerid][pCuffed] || PlayerData[playerid][pInjured] || !IsPlayerSpawned(playerid))
        return 
SendErrorMessage(playerid"You can't use this command now.");
    static
        
targetid,
        
number;
    if (
sscanf(params"d"number))
        return 
SendSyntaxMessage(playerid"/call [phone number] (1222 for taxi, 911 for emergency, 222 for news, 223 for billboards)");
    if (!
number)
        return 
SendErrorMessage(playerid"The specified phone number is not in service.");
    if (
number == 911)
    {
        
PlayerData[playerid][pEmergency] = 1;
        
PlayerPlaySound(playerid36000.00.00.0);
        
SendNearbyMessage(playerid30.0COLOR_PURPLE"** %s takes out their cellphone and places a call."ReturnName(playerid0));
        
SendClientMessage(playeridCOLOR_LIGHTBLUE"[OPERATOR]:{FFFFFF} Which service do you require: \"police\" or \"medics\"?");
    }
    else if (
number == 1222)
    {
        
PlayerData[playerid][pTaxiCalled] = 1;
        
PlayerPlaySound(playerid36000.00.00.0);
        
SendNearbyMessage(playerid30.0COLOR_PURPLE"** %s takes out their cellphone and places a call."ReturnName(playerid0));
        
SendClientMessage(playeridCOLOR_YELLOW"[OPERATOR]:{FFFFFF} The taxi department has been notified of your call.");
        
SendNearbyMessage(playerid30.0COLOR_PURPLE"** %s has hung up their cellphone."ReturnName(playerid0));
        
SendJobMessage(3COLOR_YELLOW"** %s is requesting a taxi at %s (use /acceptcall to accept)."ReturnName(playerid0), GetPlayerLocation(playerid));
    }
    else if (
number == 222)
    {
        
PlayerData[playerid][pPlaceAd] = 1;
        
PlayerPlaySound(playerid36000.00.00.0);
        
SendNearbyMessage(playerid30.0COLOR_PURPLE"** %s takes out their cellphone and places a call."ReturnName(playerid0));
        if (
PlayerData[playerid][pPlayingHours] < 4) {
            
SendClientMessage(playeridCOLOR_CYAN"[OPERATOR]:{FFFFFF} Sorry, you must play 4 hours to place an advertisement.");
            
cmd_hangup(playerid"\1");
        }
        else if (
PlayerData[playerid][pAdTime] < 1) {
            
SendClientMessage(playeridCOLOR_CYAN"[OPERATOR]:{FFFFFF} Please say \"yes\" if you wish to advertise for $500.");
        }
        else {
            
SendClientMessage(playeridCOLOR_CYAN"[OPERATOR]:{FFFFFF} You've already advertised in the last 2 minutes. Please try again later.");
            
cmd_hangup(playerid"\1");
        }
    }
    else if (
number == 223)
    {
        
PlayerPlaySound(playerid36000.00.00.0);
        
SendNearbyMessage(playerid30.0COLOR_PURPLE"** %s takes out their cellphone and places a call."ReturnName(playerid0));
        if (
PlayerData[playerid][pPlayingHours] < 4) {
            
SendClientMessage(playeridCOLOR_CYAN"[OPERATOR]:{FFFFFF} Sorry, you must play 4 hours to rent a billboard.");
            
cmd_hangup(playerid"\1");
        }
        
SendClientMessageEx(playeridCOLOR_YELLOW"[TELEFON]:{FFFFFF} Hello, this is the Los Santos Billboard Agency, please listen to the following choices!");
        
ViewBillboards(playerid);
    }
    else if ((
targetid GetNumberOwner(number)) != INVALID_PLAYER_ID)
    {
        if (
targetid == playerid)
            return 
SendErrorMessage(playerid"You can't call yourself!");
        if (
PlayerData[targetid][pPhoneOff])
            return 
SendErrorMessage(playerid"The recipient has their cellphone powered off.");
        
PlayerData[targetid][pIncomingCall] = 1;
        
PlayerData[playerid][pIncomingCall] = 1;
        
PlayerData[targetid][pCallLine] = playerid;
        
PlayerData[playerid][pCallLine] = targetid;
        
SendClientMessageEx(playeridCOLOR_YELLOW"[TELEFON]:{FFFFFF} Se realizeaza conexiunea cu numarul #%d, va rugam asteptati..."number);
        
SendClientMessageEx(targetidCOLOR_YELLOW"[TELEFON]:{FFFFFF} Apel primit de la #%d (scrie \"/raspunde\" pentru a raspunde la telefon.)."PlayerData[playerid][pPhone]);
        
PlayerPlaySound(playerid36000.00.00.0);
        
PlayerPlaySoundEx(targetid23000);
        
SendNearbyMessage(playerid30.0COLOR_PURPLE"** %s takes out their cellphone and places a call."ReturnName(playerid0));
    }
    else
    {
        
SendErrorMessage(playerid"Numarul de telefon specificat nu se afla disponibil, revino mai tarziu.");
    }
    return 
1;

[/SPOILER]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)