Jump to content
  • 0

crate bug


CSORIN

Question

4 answers to this question

Recommended Posts

  • 0

Nu-ti pica bani deoarece tu ai definit o variabila cu random de 6.

 

new amount, rand = random(6);

 

Iar la cazuri ai pus:

case 0..3:
case 4..6:

 

Nu ai are cum sa cada cazul

 

default

 

Deoarece tu ai deja cele 6 cazuri.

 

Daca vrei sa pice si bani, pune

rand = random(10);

 

Si la cazuri:

 

case 0..3: { ce vrei tu }
case 4..7: { ce vrei tu }

default: { aici in caz ca nu pica intre 0 - 7 sa primeasca bani }

 

 

Sper ca ai inteles. ;) 

Link to comment
Share on other sites

  • 0
Acum 10 ore, LeonardPWN a spus:

Nu-ti pica bani deoarece tu ai definit o variabila cu random de 6.

 


new amount, rand = random(6);

 

Iar la cazuri ai pus:


case 0..3:
case 4..6:

 

Nu ai are cum sa cada cazul

 


default

 

Deoarece tu ai deja cele 6 cazuri.

 

Daca vrei sa pice si bani, pune


rand = random(10);

 

Si la cazuri:

 


case 0..3: { ce vrei tu }
case 4..7: { ce vrei tu }

default: { aici in caz ca nu pica intre 0 - 7 sa primeasca bani }

 

 

Sper ca ai inteles. ;) 

am inteles ms

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.