Sperry wrote:
Try this:
BlockSpec:Code:
('average of numbers in %L' #r #listAverage 'list')listaverage:
Code:
listAverage | t1 t2 t3 t4 t5 t6 | t2 _ t1 lineCount. t6 _ t1 lineCount. t3 _ 0. t4 _ 1. [t2 >= 0] whileTrue: [t2 _ t2 - 1. t3 _ t3 + self getLine: (self lineNum: t4 forList: t1) ofList: t1. t4 _ t4 + 1]. t5 _ t3 / t6. ^ t5You had no value to pass through.
What did you do other than t1? T1 is already defined.
Offline
SeptimusHeap wrote:
Sperry wrote:
Try this:
BlockSpec:Code:
('average of numbers in %L' #r #listAverage 'list')listaverage:
Code:
listAverage | t1 t2 t3 t4 t5 t6 | t2 _ t1 lineCount. t6 _ t1 lineCount. t3 _ 0. t4 _ 1. [t2 >= 0] whileTrue: [t2 _ t2 - 1. t3 _ t3 + self getLine: (self lineNum: t4 forList: t1) ofList: t1. t4 _ t4 + 1]. t5 _ t3 / t6. ^ t5You had no value to pass through.
What did you do other than t1? T1 is already defined.
removed the colons.
Offline
Sperry wrote:
SeptimusHeap wrote:
Sperry wrote:
Try this:
BlockSpec:Code:
('average of numbers in %L' #r #listAverage 'list')listaverage:
Code:
listAverage | t1 t2 t3 t4 t5 t6 | t2 _ t1 lineCount. t6 _ t1 lineCount. t3 _ 0. t4 _ 1. [t2 >= 0] whileTrue: [t2 _ t2 - 1. t3 _ t3 + self getLine: (self lineNum: t4 forList: t1) ofList: t1. t4 _ t4 + 1]. t5 _ t3 / t6. ^ t5You had no value to pass through.
What did you do other than t1? T1 is already defined.
removed the colons.
Why? I need the colons to report the list. That defines t1.
Offline
SeptimusHeap wrote:
Nooooooooooooooooooooooooo!
Hang on. I pasted the code myself and it came up with errors about lineCount. I think it should be lineCount:. But that didn't work either. Plus - lineCount isn't a function and lineCount: is.
@NXIII - WHERE IS SCRATCHSKIN LOCATED (for the fifth time.) Sorry if it sounds like i am nagging
Last edited by Sperry (2010-04-11 13:50:02)
Offline
Sperry wrote:
SeptimusHeap wrote:
Nooooooooooooooooooooooooo!
Hang on. I pasted the code myself and it came up with errors about lineCount. I think it should be lineCount:. But that didn't work either. Plus - lineCount isn't a function and lineCount: is.
@NXIII - WHERE IS SCRATCHSKIN LOCATED (for the fifth time.) Sorry if it sounds like i am nagging
I already told you a while ago, download it here
Offline
nXIII wrote:
Sperry wrote:
SeptimusHeap wrote:
Nooooooooooooooooooooooooo!
Hang on. I pasted the code myself and it came up with errors about lineCount. I think it should be lineCount:. But that didn't work either. Plus - lineCount isn't a function and lineCount: is.
@NXIII - WHERE IS SCRATCHSKIN LOCATED (for the fifth time.) Sorry if it sounds like i am naggingI already told you a while ago, download it here
Sorry, I've allready downloaded the Source - I mod from the Source. I just forgot to copy Scratch Skin over. Whoops. Sorry for nagging you stupidly nXIII, you have my apologies.
Offline
WOOOOOOO HOOOOOOOO! YES! I deleted EVERYTHING in the panther folder and downloaded and reinstalled each and every one individually and IT WORKS! I CAN SEE IT ALL!
Last edited by sparks (2010-04-11 14:24:27)
Offline
sparks wrote:
[color=purple]WOOOOOOO HOOOOOOOO! YES! I deleted EVERYTHING in the panther folder and downloaded and reinstalled each and every one individually and IT WORKS! I CAN SEE IT ALL!
No Purple again? Oh dear.
Offline
nXIII, this new stuff is brilliant!
I know it's not done, but I'm just gonna list this anyway ^_^
• the [acolor] reporter dosen't show the dropdown arrow (or maybe the arrow's the same colour...
•I/O message has yet to state what is happening (eg, is trying to clear file) which would make file blocks safer.
•the blocks <file[s]exists?>, (line(n)of file[s]), and (content of []) with web addresses have yet to be added/discussed
•[color of pixil x n)y n)] IS BRILLIANT! people can make colour pickers now!
more as I get to it.
Offline
Sparks I got no new password
Offline
sparks wrote:
nXIII, this new stuff is brilliant!
I know it's not done, but I'm just gonna list this anyway ^_^
• the [acolor] reporter dosen't show the dropdown arrow (or maybe the arrow's the same colour...
•I/O message has yet to state what is happening (eg, is trying to clear file) which would make file blocks safer.
•the blocks <file[s]exists?>, (line(n)of file[s]), and (content of []) with web addresses have yet to be added/discussed
•[color of pixil x n)y n)] IS BRILLIANT! people can make colour pickers now!
more as I get to it.
[/blocks]
Thanks! A few notes:
- Yea, the arrow is the exact same color
- I haven't worked on the IO message
- Still getting there
- Thanks! I tried a more complex version that didn't include the sprite executing the block, but I failed....
Last edited by nXIII (2010-04-11 14:38:01)
Offline
Sparks I got no new password
H
E
L
L
O
!
Offline
sparks wrote:
before, Scratch had 200 shades and 200 colours for the pen, making 20,000 colours the pen could be. If we now have hue, saturation and brightness, does that increase the number of colours?
Let's see... hue 0-359.999999999 (ten decimals accuracy) means 10^10 for each digit times 360 is 360e10, multiply by 10^10 and again for hue/saturation and you get 360e30 or 3.6e32 colors (360000000000000000000000000000000 colors), but you are now limited by the display, usually 24 bits (8 bits/color r, g, b) so that's 2^24 or 16777216 colors. Although, it's actually 100 shades and 200 colors, giving 20000 colors, but you forgot decimal shades/hues.
Offline
johnnydean1 wrote:
Sparks I got no new password
H
E
L
L
O
!
Don't post the question twice! People will read it, and then make a decision. It doesn't help to post it a bunch of times, and there's even a chance that you'll post after someone has answered you and not notice, then keep posting and posting and posting!
urhungry wrote:
how would you do a pi block? i saw panther had one, but i would like to see how its done.
I made a new argument type which had a list of constants, then had something report based on the argument, like
'pi' = aConstant ifTrue: [^ 1.0 pi]. (pi is built in to floats)
Last edited by nXIII (2010-04-11 14:49:38)
Offline
nXIII wrote:
sparks wrote:
before, Scratch had 200 shades and 200 colours for the pen, making 20,000 colours the pen could be. If we now have hue, saturation and brightness, does that increase the number of colours?
Let's see... hue 0-359.999999999 (ten decimals accuracy) means 10^10 for each digit times 360 is 360e10, multiply by 10^10 and again for hue/saturation and you get 360e30 or 3.6e32 colors (360000000000000000000000000000000 colors), but you are now limited by the display, usually 24 bits (8 bits/color r, g, b) so that's 2^24 or 16777216 colors. Although, it's actually 100 shades and 200 colors, giving 20000 colors, but you forgot decimal shades/hues.
so... what you're saying is that Panther (on a perfect quality screen) could pump out... over three and a half nonillion colours?!?!?!.... erm .... *head explodes*
Offline
nXIII wrote:
I made a new argument type which had a list of constants, then had something report based on the argument, like
'pi' = aConstant ifTrue: [^ 1.0 pi]. (pi is built in to floats)
er, couldn't you just type out pi to X figures and then set the reporter to report that value?
Offline
urhungry wrote:
how would you do a pi block? i saw panther had one, but i would like to see how its done.
nXIII wrote:
I made a new argument type which had a list of constants, then had something report based on the argument, like
'pi' = aConstant ifTrue: [^ 1.0 pi]. (pi is built in to floats)
thanks
Offline
Sparks I need a new Password !!!!!
email it to me....
Last edited by johnnydean1 (2010-04-11 14:59:33)
Offline