Outline ·
[ Standard ] ·
Linear+
On Scratch 2.0, Need assistance
TSvolks2
|
Jul 15 2019, 01:39 PM, updated 5y ago
|
Getting Started
|
Need to submit a homework by tomorrow. For the game I designed, I can managed to set it to increase score by 1 everything I shoot the target. But when I set to level up when the score is more than 10, it failed. Anyone can enlight me?
Thank you
|
|
|
|
turnmoil
|
Jul 15 2019, 01:51 PM
|
|
perhaps some snippet of your code then? maybe us all can take a sneak peak on it and highlight some error it might have
|
|
|
|
TSvolks2
|
Jul 15 2019, 02:30 PM
|
Getting Started
|
Ok. will send it to9 when reaching school
|
|
|
|
funcode
|
Jul 15 2019, 02:53 PM
|
New Member
|
CODE
if($score > ($level * 10 - 1)) { $level++; }
|
|
|
|
rootbeer
|
Jul 15 2019, 06:37 PM
|
Getting Started
|
QUOTE(volks2 @ Jul 15 2019, 01:39 PM) Need to submit a homework by tomorrow. For the game I designed, I can managed to set it to increase score by 1 everything I shoot the target. But when I set to level up when the score is more than 10, it failed. Anyone can enlight me? Thank you share it in scratch, then share it in here. some can assist that can look ing at the complete code
|
|
|
|
rootbeer
|
Jul 15 2019, 09:06 PM
|
Getting Started
|
QUOTE(volks2 @ Jul 15 2019, 08:02 PM) cant help. with this, u need to share it in scratch website and send the link to us, so can check the whole code. or email the whole file to someone to test run it . showing partial code doesnt help This post has been edited by rootbeer: Jul 15 2019, 09:14 PM
|
|
|
|
bumpo
|
Jul 17 2019, 02:39 PM
|
|
at a glance it could be due to your condition. you are using = (equal) a score of more than 10 is not equal to 10 thus it wont trigger
|
|
|
|