buNNy Posted February 9, 2019 Report Share 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; } Quote COMUNITATEA MEA DE RESURSE^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^www.codeup.ro / www.codeup.ro/forum Link to comment Share on other sites More sharing options...
0 Banditul Posted February 9, 2019 Report Share 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 Quote Link to comment Share on other sites More sharing options...
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
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.