Welcome Guest ( Log In | Register )

Outline · [ Standard ] · Linear+

 On Scratch 2.0, Need assistance

views
     
TSvolks2
post Jul 15 2019, 01:39 PM, updated 5y ago

Getting Started
**
Junior Member
94 posts

Joined: Sep 2009


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
post Jul 15 2019, 01:51 PM

Casual
***
Junior Member
420 posts

Joined: Jan 2003
From: The Miau Miaw Niau Miow Land


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
post Jul 15 2019, 02:30 PM

Getting Started
**
Junior Member
94 posts

Joined: Sep 2009


Ok. will send it to9 when reaching school

funcode
post Jul 15 2019, 02:53 PM

New Member
*
Newbie
22 posts

Joined: Nov 2018
CODE


if($score > ($level * 10 - 1))
{
   $level++;
}


rootbeer
post Jul 15 2019, 06:37 PM

Getting Started
**
Junior Member
210 posts

Joined: Dec 2006


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
TSvolks2
post Jul 15 2019, 08:02 PM

Getting Started
**
Junior Member
94 posts

Joined: Sep 2009


user posted image
rootbeer
post Jul 15 2019, 09:06 PM

Getting Started
**
Junior Member
210 posts

Joined: Dec 2006


QUOTE(volks2 @ Jul 15 2019, 08:02 PM)
user posted image
*
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
post Jul 17 2019, 02:39 PM

On my way
****
Junior Member
632 posts

Joined: Mar 2013


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


 

Change to:
| Lo-Fi Version
0.0122sec    0.27    5 queries    GZIP Disabled
Time is now: 29th March 2024 - 05:31 PM