buNNy Posted February 9, 2019 Posted February 9, 2019 error 059: function argument may not have a default value (variable "firstBet") Spoiler function PutPlayerInSlotMachine(playerid, firstBet=MIN_BET, startBalance=0) >>>>>>>>>>> EROAREA { if(Gambling[playerid] != G_STATE_NOT_GAMBLING) return print("Already gambling"); Gambling[playerid] = G_STATE_READY; TextDrawShowForPlayer(playerid, ReadyText); PlayerTextDrawShow(playerid, BetText[playerid]); TextDrawShowForPlayer(playerid, VerText); Slots[playerid][0] = random(5); Slots[playerid][1] = random(5); Slots[playerid][2] = random(5); ShowPlayerSlots(playerid, Slots[playerid][0], Slots[playerid][1], Slots[playerid][2]); Bet[playerid] = firstBet; GivePlayerMoney(playerid, -startBalance); Balance[playerid] = startBalance; UpdateBetText(playerid); TogglePlayerControllable(playerid, 0); return 1; } COMUNITATEA MEA DE RESURSE^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^www.codeup.ro / www.codeup.ro/forum
0 Banditul Posted February 9, 2019 Posted February 9, 2019 MIN_BET are o valoare definita? Daca da presupunerea mea e ca nu merge sa folosesti constante ca valori default la argumentele functiei, inlocuiesti MIN_BUT cu valoarea exacta
Question
buNNy
error 059: function argument may not have a default value (variable "firstBet")
function PutPlayerInSlotMachine(playerid, firstBet=MIN_BET, startBalance=0) >>>>>>>>>>> EROAREA
{
if(Gambling[playerid] != G_STATE_NOT_GAMBLING) return print("Already gambling");
Gambling[playerid] = G_STATE_READY;
TextDrawShowForPlayer(playerid, ReadyText);
PlayerTextDrawShow(playerid, BetText[playerid]);
TextDrawShowForPlayer(playerid, VerText);
Slots[playerid][0] = random(5);
Slots[playerid][1] = random(5);
Slots[playerid][2] = random(5);
ShowPlayerSlots(playerid, Slots[playerid][0], Slots[playerid][1], Slots[playerid][2]);
Bet[playerid] = firstBet;
GivePlayerMoney(playerid, -startBalance);
Balance[playerid] = startBalance;
UpdateBetText(playerid);
TogglePlayerControllable(playerid, 0);
return 1;
}
COMUNITATEA MEA DE RESURSE

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
www.codeup.ro / www.codeup.ro/forum
1 answer to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now