Float(Object)>>error: Float>>sqrt Point>>r Point>>rotateBy:about: [] in WarpBit class>>rotate:degress:center:scaleBy:smoothing: Array(SequenceableCollection)>>collect: WarpBit class>>rotate:degress:center:scaleBy:smoothing: ScratchSpriteMorph>>generateRotatedForm ScratchSpriteMorph>>layoutChanged ScratchSpriteMorph(ScriptableScratchMorph)>>costumeChanged
Can someone tell me what that means?
It's annoing
I ment 'x < 0' not 'x > 0'
Last edited by ThePCKid (2009-10-11 13:28:12)
Offline
I take it this happened when you tried to 'turn (sqrt (###) ) degrees', of something along those lines. Also, are you sure you didn't make a typo? It is true that you cannot take the square root of a negative number (x < 0), but what you said, x > 0, should work. To avoid this problem, extending it to (abs(sqrt(x) ) ) will do the trick. A slightly more thorough, although sometimes mathematically incorrect way would be
<if><(<{ x }><<>0)>
<set{ y }to(( 0 <-> <abs( sqrt(x) )) )) ))
<else>
<set{ y }to <abs( sqrt(x)) ))
<end>
[/blocks]
If you provided more information, I could help you further.
Last edited by billyedward (2009-10-11 02:00:23)
Offline
Another thing:
You are using scratch 1.0 with error catching turned off, right?
If you use a more up-to-date version, then the script will simply turn red, no bothersome walkback error.
Offline
billyedward wrote:
Another thing:
You are using scratch 1.0 with error catching turned off, right?
If you use a more up-to-date version, then the script will simply turn red, no bothersome walkback error.
I have Scratch 1.4. There is no error catching
Offline
ThePCKid wrote:
billyedward wrote:
Another thing:
You are using scratch 1.0 with error catching turned off, right?
If you use a more up-to-date version, then the script will simply turn red, no bothersome walkback error.I have Scratch 1.4. There is no error catching
Wierd... If you open up the Jetpack_Girl sprite's scripts, where it says [blocks]<abs( [/blocks], it will be red instead of green. So you should re-download Scratch 1.4 and see if that helps!
Offline
I don't know what this means:
Float(Object)>>error: Float>>sqrt Point>>r Point>>rotateBy:about: [] in WarpBit class>>rotate:degress:center:scaleBy:smoothing: Array(SequenceableCollection)>>collect: WarpBit class>>rotate:degress:center:scaleBy:smoothing: ScratchSpriteMorph>>generateRotatedForm ScratchSpriteMorph>>layoutChanged ScratchSpriteMorph(ScriptableScratchMorph)>>costumeChanged
But you might be using the sqrt block wrong. Also, look at this line:
ScratchSpriteMorph>>generateRotadedForm
That might have something to do with
[blocks]<turn cw( )degrees>[/blocks]and[blocks]<turn cw( )degrees>[/blocks]but I could be wrong.
Also, the line
ScratchSpriteMorph(ScriptableScratchMorph)>>costumeChanged
might have something to do with
[blocks]<switch to costume[ [/blocks]or[blocks]<next costume>[/blocks]
Offline