01.10.2013, 17:28
(
Последний раз редактировалось Deji; 01.10.2013 в 17:34.
Причина: \/ ninja'd
)
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.
Refer to the wiki for information on the return value: https://sampwiki.blast.hk/wiki/OnPlayerRequestClass
0 being returned will reject the spawn attempt.
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 }
0 being returned will reject the spawn attempt.