A small help.
#1

I got one warning can anyone help?
Код:
cartoys.pwn(96) : warning 217: loose indentation
Line 92-99:
pawn Код:
DestroyVehicleToys(carid, delete = 0) {
    for(new i=0;i<MAX_CAR_TOYS_PER_CAR;i++) {
        if(VehicleCarToys[carid][i][EVehCarToy_ObjID] != 0)
            DestroyCarToy(VehicleCarToys[carid][i][EVehCarToy_ObjID], delete);
            VehicleCarToys[carid][i][EVehCarToy_SQLID] = 0;

    }
}
Reply
#2

Quote:
Originally Posted by VladimirMark
Посмотреть сообщение
I got one warning can anyone help?
Код:
cartoys.pwn(96) : warning 217: loose indentation
Line 92-99:
pawn Код:
DestroyVehicleToys(carid, delete = 0) {
    for(new i=0;i<MAX_CAR_TOYS_PER_CAR;i++) {
        if(VehicleCarToys[carid][i][EVehCarToy_ObjID] != 0)
            DestroyCarToy(VehicleCarToys[carid][i][EVehCarToy_ObjID], delete);
            VehicleCarToys[carid][i][EVehCarToy_SQLID] = 0;

    }
}
is warning wont do anything just ignore it it has a fix but its fearless i got alot of loose identefications in my server and working great
Reply
#3

pawn Код:
DestroyVehicleToys(carid, delete = 0) {
    for(new i=0;i<MAX_CAR_TOYS_PER_CAR;i++) {
        if(VehicleCarToys[carid][i][EVehCarToy_ObjID] != 0) {
            DestroyCarToy(VehicleCarToys[carid][i][EVehCarToy_ObjID], delete);
            VehicleCarToys[carid][i][EVehCarToy_SQLID] = 0;
        }
    }
}
Reply
#4

Thanks both of you
Reply
#5

Sorry for double posting.
I got 2 errors :P
Код:
\account.pwn(1497) : error 017: undefined symbol "playerid"
\account.pwn(1498) : error 017: undefined symbol "playerid"
Lines 1486-1512:
pawn Код:
buylevel()
{
    foreach(Player, i)
    {
    new nxtlevel = GetPVarInt(i, "Level")+1;
    //new costlevel = nxtlevel*levelcost;
    new expamount = nxtlevel*levelexp;
    new infostring[96];
    new exp = GetPVarInt(i, "RespectPoints");
    if (exp < expamount)
    {
        format(infostring, sizeof(infostring), "   You need %d respect points! You only have [%d] !",expamount,GetPVarInt(playerid,"RespectPoints"));
        SendClientMessage(playerid, COLOR_LIGHTRED, infostring);
        continue;
    }
        format(infostring, sizeof(infostring), "~g~LEVEL UP~n~~w~You Are Now Level %d", nxtlevel);
        GameTextForPlayer(i, infostring, 5000, 1);
        PlayerPlaySound(i, 1052, 0.0, 0.0, 0.0);
        PlayerPlayMusic(i);
        //GiveMoneyEx(playerid, -costlevel);
        SetPVarInt(i, "Level", nxtlevel);
        SetPlayerScore(i, nxtlevel);
        exp -= expamount;
        SetPVarInt(i, "RespectPoints", exp);
    }

}
Reply
#6

Use i instead of playerid?
Reply
#7

You mean where is (playerid, ...............) I have to do it (i, .....................)
Reply
#8

Quote:
Originally Posted by VladimirMark
Посмотреть сообщение
You mean where is (playerid, ...............) I have to do it (i, .....................)
Is this code even made by you? I don't know what exactly you're doing there so you must know what you are doing.
Reply
#9

I'm trying to help a friend with a script he got/downloaded :P
Reply
#10

pawn Код:
buylevel()
{
    foreach(Player, i)
    {
    new nxtlevel = GetPVarInt(i, "Level")+1;
    //new costlevel = nxtlevel*levelcost;
    new expamount = nxtlevel*levelexp;
    new infostring[96];
    new exp = GetPVarInt(i, "RespectPoints");
    if (exp < expamount)
    {
        format(infostring, sizeof(infostring), "   You need %d respect points! You only have [%d] !",expamount,GetPVarInt(i,"RespectPoints"));
        SendClientMessage(i, COLOR_LIGHTRED, infostring);
        continue;
    }
        format(infostring, sizeof(infostring), "~g~LEVEL UP~n~~w~You Are Now Level %d", nxtlevel);
        GameTextForPlayer(i, infostring, 5000, 1);
        PlayerPlaySound(i, 1052, 0.0, 0.0, 0.0);
        PlayerPlayMusic(i);
        //GiveMoneyEx(playerid, -costlevel);
        SetPVarInt(i, "Level", nxtlevel);
        SetPlayerScore(i, nxtlevel);
        exp -= expamount;
        SetPVarInt(i, "RespectPoints", exp);
    }

}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)