OnPlayerRequestClass problem
#2

The function has to return a value. Look at your code and think... does it return a value in every situation?

No, if gPlayerTeam[playerid] == -1 doesn't evaluate to true, nothing specific is returned. The function is returning an undefined value, hence the warning.
Код:
        return 1;    // either move this..
        }
        // .. here, or put another return here, if you want to return something different
}
Refer to the wiki for information on the return value: https://sampwiki.blast.hk/wiki/OnPlayerRequestClass
0 being returned will reject the spawn attempt.
Reply


Messages In This Thread
OnPlayerRequestClass problem - by Bek_Loking - 01.10.2013, 17:23
Re: OnPlayerRequestClass problem - by Deji - 01.10.2013, 17:28
Re: OnPlayerRequestClass problem - by Areax - 01.10.2013, 17:28
Re: OnPlayerRequestClass problem - by JimmyCh - 01.10.2013, 19:33
Re: OnPlayerRequestClass problem - by Bek_Loking - 01.10.2013, 19:42
Re: OnPlayerRequestClass problem - by VenomMancer - 01.10.2013, 19:42

Forum Jump:


Users browsing this thread: 1 Guest(s)