#1

pawn Код:
ptask PayBankTaxes[2400000](playerid)//40 minutes
{
    new str[128], taxes;

    if(Player[playerid][Bank] > 25000 || Player[playerid][Bank] < 74999) //2.0125%
    {
        taxes = Player[playerid][Bank] / 64;
        Player[playerid][Bank] = Player[playerid][Bank] - Player[playerid][Bank] / 64;
    }
    else if(Player[playerid][Bank] > 75000 || Player[playerid][Bank] < 149999) //3.125%
    {
        taxes = Player[playerid][Bank] / 32;
        Player[playerid][Bank] = Player[playerid][Bank] - Player[playerid][Bank] / 32;
    }
    else if(Player[playerid][Bank] >= 150000) //6.25%
    {
        taxes = Player[playerid][Bank] / 16;
        Player[playerid][Bank] = Player[playerid][Bank] - Player[playerid][Bank] / 16;
    }

    SCM(playerid, COLOR_WHITE, "|___ BANK STATEMENT ___|");
    SCMEX(playerid, COLOR_FADE1, "   Balance: %s", formatInt(Player[playerid][Bank]));
    SCMEX(playerid, COLOR_FADE1, "   Taxes paid: %s", formatInt(taxes));
    SCM(playerid, COLOR_WHITE, "|________________________|");

    format(str, sizeof(str), "~y~Taxes~n~~w~Paid~n~~g~%s", formatInt(taxes));
    GameTextForPlayer(playerid, str, 3000, 1);
}
Quote:

error 047: array sizes do not match, or destination array is too small

Line:

pawn Код:
ptask PayBankTaxes[2400000](playerid)
Why?
Reply
#2

******:
Код:
That error usually occurs when you change "MAX_PLAYERS" after including YSI instead of before, meaning that the different parts of your mode are using different values.
Reply
#3

From ******:


Always re-define MAX_PLAYERS like so:


Код:
#include <a_samp>
#undef MAX_PLAYERS
#define MAX_PLAYERS 123

// rest of script
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)