This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-12-12 22:07:47

nitromian
Scratcher
Registered: 2012-09-02
Posts: 9

Average finding glitch

Okay, so today I was working on updating dual snot, and I put this script in that is supposed to average two variables:

set [avg. variable v] to (((variable 1) + (variable2)) / 2)
I think that the by the way the forums doesn't process it right is enough proof to show you guy's that it didn't work.  tongue  It took one of the numbers and set the average to that. So instead of using that script I used distributive property and divided both variables by 2 before adding them. I hope that this glitch will be fixed in Scratch 2.0.

Offline

 

#2 2012-12-12 22:12:10

jvvg
Scratcher
Registered: 2008-03-26
Posts: 1000+

Re: Average finding glitch

nitromian wrote:

Okay, so today I was working on updating dual snot, and I put this script in that is supposed to average two variables:

set [avg. variable v] to (((variable 1) + (variable2)) / 2)
I think that the by the way the forums doesn't process it right is enough proof to show you guy's that it didn't work.  tongue  It took one of the numbers and set the average to that. So instead of using that script I used distributive property and divided both variables by 2 before adding them. I hope that this glitch will be fixed in Scratch 2.0.

set [avg. variable v] to (((variable 1) + (variable2)) / (2))

Code:

set [avg. variable v] to (((variable 1) + (variable2)) / (2))

You need to put parentheses around the final 2 smile

Last edited by jvvg (2012-12-12 22:12:29)


http://tiny.cc/zwgbewhttp://tiny.cc/e1gbewhttp://tiny.cc/zygbewhttp://tiny.cc/izgbew
Goodbye, Scratch 1.4  sad                                                        Hello Scratch 2.0!  smile

Offline

 

#3 2012-12-13 15:53:51

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: Average finding glitch

it works. you must have made an error somewhere, but i dont know what


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

Board footer