[Ajuda] Help-Me
#1



pawn Код:
error 028: invalid subscript (not an array or too many subscripts): "NumHouses"
error 017: undefined symbol "i"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
pawn Код:
forward AtualizarCasa();
public AtualizarCasa()
{
    new NumHouses, String[26], Stringg[26];
    for (new i; i < MAX_HOUSESPERPLAYER; i++)
    {
        if(APlayerData[i][Houses][i] != 0) NumHouses++;
        format(String, sizeof(String), "~w~CASAS:", NumHouses[i]);
        format(Stringg, sizeof(Stringg), "~r~%i", NumHouses[i]);
        TextDrawShowForPlayer(CasaTextDraw[i], String);
        TextDrawSetString(CasaTextDraw[i], String);
        TextDrawShowForPlayer(CasaTextDraw2[i], Stringg);
        TextDrawSetString(CasaTextDraw2[i], Stringg);
    }
    return true;
}
Reply
#2

Alguйm
Reply
#3

pawn Код:
if(APlayerData[i][Houses][i] != 0) NumHouses++;
Tem uma array a+,na variavel !
Reply
#4

NumHouses nгo estб definida com Array, estб normal. Coloca:
pawn Код:
new NumHouses[MAX_PLAYERS];
E nessa parte vocк arruma desta forma:
pawn Код:
if(APlayerData[i][Houses][i] != 0) NumHouses[i]++;
Reply
#5

Deu certo baiano, vlw mesmo!
Reply
#6

pawn Код:
forward AtualizarCasa();
public AtualizarCasa()
{
    new NumHouses[MAX_HOUSESPERPLAYER], String[26], Stringg[26];
    for (new i; i < MAX_HOUSESPERPLAYER; i++)
    {
        if(APlayerData[i][Houses][i] != 0) NumHouses[i]++;
        format(String, sizeof(String), "~w~CASAS:", NumHouses[i]);
        format(Stringg, sizeof(Stringg), "~r~%i", NumHouses[i]);
        TextDrawShowForPlayer(CasaTextDraw[i], String);
        TextDrawSetString(CasaTextDraw[i], String);
        TextDrawShowForPlayer(CasaTextDraw2[i], Stringg);
        TextDrawSetString(CasaTextDraw2[i], Stringg);
    }
    return true;
}
xD
Reply
#7

Fui testar no servidor, ela sу conta 1 casa sendo que tenho 3.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)