Invalid Memory Access?
#1

Weird, I see these errors in my server logs when I try to use /moneybag.

[13:15:35] [debug] Run time error 5: "Invalid memory access"
[13:15:35] [debug] AMX backtrace:
[13:15:35] [debug] #0 0007d0f0 in StringReplace (string[]=@01fa32ec "UZair", replace[]=@01f81abc "UZair", size=24) at D:\SA-MP Things\SAMP 0.3.7\gamemodes\LSGW.pwn:8549
[13:15:35] [debug] #1 0007c568 in public cmd_moneybag (playerid=2, params[]=@021f81d0 "") at D:\SA-MP Things\SAMP 0.3.7\gamemodes\LSGW.pwn:8497
[13:15:35] [debug] #2 native CallLocalFunction () from samp03svr
[13:15:35] [debug] #3 0001d60c in ?? (... <2 arguments>) at D:\SA-MP Things\SAMP 0.3.7\pawno\include\i-zcmd.inc:94
[13:15:35] [debug] #4 0000e8c4 in public OnPlayerCommandText (playerid=2, cmdtext[]=@021f81a8 "/moneybag") at D:\SA-MP Things\SAMP 0.3.7\pawno\include\YSI\y_hooks/impl.inc:929

Moneybag CMD:

pawn Код:
CMD:moneyrush(playerid)
{
    if(!IsPlayerSpawned(playerid)) return SendClientMessage(playerid,COLOR_ERROR,"You can not use this command while you are dead.");
    new bags = 0, string[50];
    for(new i=0; i < MAX_BAGS; i++)
    {
        if(PlayerMoneyBagInfo[i][pBagDropped])
        {
            bags++;
            if(bags < 16 && bags > 0)
            {
                ShowTextDrawMenu(playerid, TD_MENU_INFO,"~G~Money Bags", bags+3, 0);
                ShowTextDrawMenuItems(playerid, 0, "Money Bags Dropped By Players", " ", " ");
                format(string,sizeof(string),"~P~%s ~W~by %s",PlayerMoneyBagInfo[i][pBagLoc],PlayerMoneyBagInfo[i][pBagDroppedBy]);
                ShowTextDrawMenuItems(playerid, bags+2, " ", string, " ");
            }
        }
    }
    if(bags == 0)
    {
        ShowTextDrawMenu(playerid, TD_MENU_INFO,"~G~Money Bags", bags+1, 0);
        ShowTextDrawMenuItems(playerid, 0, "Money Bags Dropped By Players", " ", " ");
        ShowTextDrawMenuItems(playerid, bags+1, " ", "~R~ No ~W~Players ~G~Money Bag~R~ Lost ", " ");
    }
    return 1;
}
forward SaveMoneyBagPickup(bagid); // Line 8497
public SaveMoneyBagPickup(bagid)
{
    PlayerMoneyBagInfo[bagid][pBagJustDroped]=false;
    return 1;
}
Reply


Messages In This Thread
Invalid Memory Access? - by Youssef221 - 28.06.2015, 11:28
Re: Invalid Memory Access? - by Jefff - 28.06.2015, 13:55
Re: Invalid Memory Access? - by Youssef221 - 28.06.2015, 14:07
Re: Invalid Memory Access? - by Youssef221 - 28.06.2015, 14:49
Re: Invalid Memory Access? - by Jonny5 - 28.06.2015, 14:56
Re: Invalid Memory Access? - by Youssef221 - 28.06.2015, 15:06

Forum Jump:


Users browsing this thread: 1 Guest(s)