pomoc sa warningom

Započeo [OG]Foley, Jun 16, 2010, 18:24:51 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

eto trebam pomoc jer mislim da zbog toga mi nes nevalja sa ovom FS pa da rijesim taj warning
evo kod

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == 2)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(GetCreatorID(vehicleid)!=0)
{
Tunen(vehicleid);
    if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid)))
    {
SendClientMessage(playerid,GREEN," Dobrodosli nazad u svoje vozilo");
    }
    else if(strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar"))
    {
    if(!IsPlayerAdmin(playerid)){
    TogglePlayerControllable(playerid,0);}
    new fffx[128];
    format(fffx,sizeof(fffx),"Ovo vozilo je na prodaju. ~n~Cijena: ~g~ %d$",VehicleSystem[GetCreatorID(vehicleid)][preis]);
    GameTextForPlayer(playerid,fffx, 5000, 3);
    SendClientMessage(playerid,YELLOW,"Kucajte /vkupi da ga kupite. Ako nezelite kupiti ovo vozilu kucajte /exitv");
    }
    else
    {
    TogglePlayerControllable(playerid,0);
    new ex[128];
    format(ex,sizeof(ex),"Vlasnik: ~g~ %s",VehicleSystem[GetCreatorID(vehicleid)][owner]);
    GameTextForPlayer(playerid, ex, 5000, 1);
    {
    if(Groceries[playerid][pOdbijacBrave] >= 1 )
        {
            TogglePlayerControllable(playerid, 0);
        SendClientMessage(playerid, ORANGE, "   Imas kod sebe HotWire alat, ako zelis ukrasti auto upisi /hotwire, ako ne zelis /exitv !");
        }
else
{
RemovePlayerFromVehicle(playerid);
}
    }
    return 1;
    }

    }
    }
}


i evo warning


C:\Users\Alen\Desktop\PROGRAMING\Serious-Gaming RolePlay\filterscripts\osobna.pwn(641) : warning 209: function "OnPlayerStateChange" should return a value
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.

HELP!!


Probaj ovo, al nisam siguran

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == 2)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(GetCreatorID(vehicleid)!=0)
{
Tunen(vehicleid);
    if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid)))
    {
SendClientMessage(playerid,GREEN," Dobrodosli nazad u svoje vozilo");
    }
    else if(strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar"))
    {
    if(!IsPlayerAdmin(playerid)){
    TogglePlayerControllable(playerid,0);}
    new fffx[128];
    format(fffx,sizeof(fffx),"Ovo vozilo je na prodaju. ~n~Cijena: ~g~ %d$",VehicleSystem[GetCreatorID(vehicleid)][preis]);
    GameTextForPlayer(playerid,fffx, 5000, 3);
    SendClientMessage(playerid,YELLOW,"Kucajte /vkupi da ga kupite. Ako nezelite kupiti ovo vozilu kucajte /exitv");
    }
    else
    {
    TogglePlayerControllable(playerid,0);
    new ex[128];
    format(ex,sizeof(ex),"Vlasnik: ~g~ %s",VehicleSystem[GetCreatorID(vehicleid)][owner]);
    GameTextForPlayer(playerid, ex, 5000, 1);
    {
    if(Groceries[playerid][pOdbijacBrave] >= 1 )
        {
            TogglePlayerControllable(playerid, 0);
        SendClientMessage(playerid, ORANGE, "   Imas kod sebe HotWire alat, ako zelis ukrasti auto upisi /hotwire, ako ne zelis /exitv !");
        }
else
{
RemovePlayerFromVehicle(playerid);
}
    }
    return 1;
    }

    }
    return 1;
    }
Aequam memento rebus in arduis servare mentem.

Citat: LuKsA poslato Jun 16, 2010, 21:55:55 POSLE PODNE
Probaj ovo, al nisam siguran

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == 2)
{
new vehicleid = GetPlayerVehicleID(playerid);
if(GetCreatorID(vehicleid)!=0)
{
Tunen(vehicleid);
    if (strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],Spielername(playerid)))
    {
SendClientMessage(playerid,GREEN," Dobrodosli nazad u svoje vozilo");
    }
    else if(strmatch(VehicleSystem[GetCreatorID(vehicleid)][owner],"dealercar"))
    {
    if(!IsPlayerAdmin(playerid)){
    TogglePlayerControllable(playerid,0);}
    new fffx[128];
    format(fffx,sizeof(fffx),"Ovo vozilo je na prodaju. ~n~Cijena: ~g~ %d$",VehicleSystem[GetCreatorID(vehicleid)][preis]);
    GameTextForPlayer(playerid,fffx, 5000, 3);
    SendClientMessage(playerid,YELLOW,"Kucajte /vkupi da ga kupite. Ako nezelite kupiti ovo vozilu kucajte /exitv");
    }
    else
    {
    TogglePlayerControllable(playerid,0);
    new ex[128];
    format(ex,sizeof(ex),"Vlasnik: ~g~ %s",VehicleSystem[GetCreatorID(vehicleid)][owner]);
    GameTextForPlayer(playerid, ex, 5000, 1);
    {
    if(Groceries[playerid][pOdbijacBrave] >= 1 )
        {
            TogglePlayerControllable(playerid, 0);
        SendClientMessage(playerid, ORANGE, "   Imas kod sebe HotWire alat, ako zelis ukrasti auto upisi /hotwire, ako ne zelis /exitv !");
        }
else
{
RemovePlayerFromVehicle(playerid);
}
    }
    return 1;
    }

    }
    return 1;
    }

Dobim puno errora pa sam dodao jos jednu zagradu i errori se rijese ali warning opet ostaje :S