public OnAccountLoad(playerid)
{
new temp[40];
cache_get_row(0, 4, temp), PlayerInfo[playerid][pRegistered] = strval(temp),
cache_get_row(0, 5, temp), PlayerInfo[playerid][pCash] = strval(temp),
cache_get_row(0, 6, temp), PlayerInfo[playerid][pBank] = strval(temp),
cache_get_row(0, 7, temp), PlayerInfo[playerid][pSkin] = strval(temp),
cache_get_row(0, 8, temp), PlayerInfo[playerid][pSex] = strval(temp),
cache_get_row(0, 9, temp), PlayerInfo[playerid][pAge] = strval(temp),
cache_get_row(0, 10, PlayerInfo[playerid][pOrigin]),
cache_get_row(0, 11, temp), PlayerInfo[playerid][pLevel] = strval(temp),
cache_get_row(0, 12, temp), PlayerInfo[playerid][pExp] = strval(temp),
cache_get_row(0, 13, temp), PlayerInfo[playerid][pHours] = strval(temp),
cache_get_row(0, 14, temp), PlayerInfo[playerid][pAdmin] = strval(temp),
cache_get_row(0, 15, temp), PlayerInfo[playerid][pHelper] = strval(temp),
cache_get_row(0, 16, temp), PlayerInfo[playerid][pInt] = strval(temp),
cache_get_row(0, 17, temp), PlayerInfo[playerid][pWorld] = strval(temp),
cache_get_row(0, 18, temp), PlayerInfo[playerid][pJailed] = strval(temp),
cache_get_row(0, 19, temp), PlayerInfo[playerid][pJailTime] = strval(temp),
cache_get_row(0, 20, temp), PlayerInfo[playerid][pBanned] = strval(temp),
cache_get_row(0, 21, temp), PlayerInfo[playerid][pWarns] = strval(temp),
cache_get_row(0, 22, temp), PlayerInfo[playerid][pDonateRank] = strval(temp),
cache_get_row(0, 23, temp), PlayerInfo[playerid][pCarLic] = strval(temp),
cache_get_row(0, 24, temp), PlayerInfo[playerid][pWepLic] = strval(temp),
cache_get_row(0, 25, temp), PlayerInfo[playerid][pFlyLic] = strval(temp),
cache_get_row(0, 26, temp), PlayerInfo[playerid][pPosX] = floatstr(temp),
cache_get_row(0, 27, temp), PlayerInfo[playerid][pPosY] = floatstr(temp),
cache_get_row(0, 28, temp), PlayerInfo[playerid][pPosZ] = floatstr(temp),
cache_get_row(0, 29, temp), PlayerInfo[playerid][pPosA] = floatstr(temp),
cache_get_row(0, 30, temp), PlayerInfo[playerid][pDied] = strval(temp),
cache_get_row(0, 31, temp), PlayerInfo[playerid][pFightStyle] = strval(temp),
cache_get_row(0, 32, temp), PlayerInfo[playerid][pPen] = strval(temp),
cache_get_row(0, 33, PlayerInfo[playerid][pNote1]),
cache_get_row(0, 34, temp), PlayerInfo[playerid][pNote1s] = strval(temp),
cache_get_row(0, 35, PlayerInfo[playerid][pNote2]),
cache_get_row(0, 36, temp), PlayerInfo[playerid][pNote2s] = strval(temp),
cache_get_row(0, 37, PlayerInfo[playerid][pNote3]),
cache_get_row(0, 38, temp), PlayerInfo[playerid][pNote3s] = strval(temp),
cache_get_row(0, 39, PlayerInfo[playerid][pAttributes]),
cache_get_row(0, 40, temp), PlayerInfo[playerid][pPayCheckMade] = strval(temp),
cache_get_row(0, 41, temp), PlayerInfo[playerid][pPayCheckMoney] = strval(temp),
cache_get_row(0, 42, temp), PlayerInfo[playerid][pUpgrade] = strval(temp),
cache_get_row(0, 43, temp), PlayerInfo[playerid][pPayDayTime] = strval(temp),
cache_get_row(0, 44, temp), PlayerInfo[playerid][pSHealth] = floatstr(temp),
cache_get_row(0, 45, temp), PlayerInfo[playerid][pCellPhone] = strval(temp),
cache_get_row(0, 46, temp), PlayerInfo[playerid][pNumber] = strval(temp),
cache_get_row(0, 47, temp), PlayerInfo[playerid][pSavings] = strval(temp),
cache_get_row(0, 48, temp), PlayerInfo[playerid][pHouseKey] = strval(temp),
cache_get_row(0, 49, temp), PlayerInfo[playerid][pMeleeWep] = strval(temp),
cache_get_row(0, 50, temp), PlayerInfo[playerid][pWep1] = strval(temp),
cache_get_row(0, 51, temp), PlayerInfo[playerid][pWep2] = strval(temp);
return 1;
}
“staging buffer”: the staging buffer holds the code generated for an expression before it is passed to the peephole optimizer. The staging buffer grows dynamically, so an overflow of the staging buffer basically is an “out of memory” error. |
public OnAccountLoad(playerid)
{
new temp[40];
PlayerInfo[playerid][pRegistered] = cache_get_row_int(0, 4);
PlayerInfo[playerid][pCash] = cache_get_row_int(0, 5);
PlayerInfo[playerid][pBank] = cache_get_row_int(0, 6);
PlayerInfo[playerid][pSkin] = cache_get_row_int(0, 7);
PlayerInfo[playerid][pSex] = cache_get_row_int(0, 8);
PlayerInfo[playerid][pAge] = cache_get_row_int(0, 9);
cache_get_row(0, 10, PlayerInfo[playerid][pOrigin]);
PlayerInfo[playerid][pLevel] = cache_get_row_int(0, 11);
PlayerInfo[playerid][pExp] = cache_get_row_int(0, 12);
PlayerInfo[playerid][pHours] = cache_get_row_int(0, 13);
PlayerInfo[playerid][pAdmin] = cache_get_row_int(0, 14);
PlayerInfo[playerid][pHelper] = cache_get_row_int(0, 15);
PlayerInfo[playerid][pInt] = cache_get_row_int(0, 16);
PlayerInfo[playerid][pWorld] = cache_get_row_int(0, 17);
PlayerInfo[playerid][pJailed] = cache_get_row_int(0, 18);
PlayerInfo[playerid][pJailTime] = cache_get_row_int(0, 19);
PlayerInfo[playerid][pBanned] = cache_get_row_int(0, 20);
PlayerInfo[playerid][pWarns] = cache_get_row_int(0, 21);
PlayerInfo[playerid][pDonateRank] = cache_get_row_int(0, 22);
PlayerInfo[playerid][pCarLic] = cache_get_row_int(0, 23);
PlayerInfo[playerid][pWepLic] = cache_get_row_int(0, 24);
PlayerInfo[playerid][pFlyLic] = cache_get_row_int(0, 25);
PlayerInfo[playerid][pPosX] = cache_get_row_float(0, 26);
PlayerInfo[playerid][pPosY] = cache_get_row_float(0, 27);
PlayerInfo[playerid][pPosZ] = cache_get_row_float(0, 28);
PlayerInfo[playerid][pPosA] = cache_get_row_float(0, 29);
PlayerInfo[playerid][pDied] = cache_get_row_int(0, 30);
PlayerInfo[playerid][pFightStyle] = cache_get_row_int(0, 31);
PlayerInfo[playerid][pPen] = cache_get_row_int(0, 32);
cache_get_row(0, 33, PlayerInfo[playerid][pNote1]);
PlayerInfo[playerid][pNote1s] = cache_get_row_int(0, 34);
cache_get_row(0, 35, PlayerInfo[playerid][pNote2]);
PlayerInfo[playerid][pNote2s] = cache_get_row_int(0, 36);
cache_get_row(0, 37, PlayerInfo[playerid][pNote3]);
PlayerInfo[playerid][pNote3s] = cache_get_row_int(0, 38);
cache_get_row(0, 39, PlayerInfo[playerid][pAttributes]),
PlayerInfo[playerid][pPayCheckMade] = cache_get_row_int(0, 40);
PlayerInfo[playerid][pPayCheckMoney] = cache_get_row_int(0, 41);
PlayerInfo[playerid][pUpgrade] = cache_get_row_int(0, 42);
PlayerInfo[playerid][pPayDayTime] = cache_get_row_int(0, 43);
PlayerInfo[playerid][pSHealth] = cache_get_row_float(0, 44);
PlayerInfo[playerid][pCellPhone] = cache_get_row_int(0, 45);
PlayerInfo[playerid][pNumber] = cache_get_row_int(0, 46);
PlayerInfo[playerid][pSavings] = cache_get_row_int(0, 47);
PlayerInfo[playerid][pHouseKey] = cache_get_row_int(0, 48);
PlayerInfo[playerid][pMeleeWep] = cache_get_row_int(0, 49);
PlayerInfo[playerid][pWep1] = cache_get_row_int(0, 50);
PlayerInfo[playerid][pWep2] = cache_get_row_int(0, 51);
PlayerInfo[playerid][pAmmo1] = cache_get_row_int(0, 52);
PlayerInfo[playerid][pAmmo2] = cache_get_row_int(0, 53);
return 1;
}
cache_get_row(0, 10, temp, dbhandle, 128);
new tmp[ENUM_OF_PlayerInfo];
cache_get_row(0, 10, temp, dbhandle, sizeof tmp[pOrigin]);