flashgocrazy wrote:
does anybody have to code for a block in panther that imports a project?
import project
-Code:
| t1 | t1 _ self ownerThatIsA: ScratchFrameMorph. t1 importScratchProject
Offline
Remember the "password for _ is _ " block? Every time I use it it says: Trouble resolving server name. WHAT does that mean? Please correct!
Blockspec:
('password for %s is %s ?' #b #username:password:)
Code:
username: t1 password:t2
(HTTPSocket httpGet: 'contentshttp://scratch.mit.edu/api/authenticateuser? username=" , t1 , '&password=' , t2) contents = 'false' ifTrue: [ ^ false].
^ true
Offline
Squawkers13 wrote:
Remember the "password for _ is _ " block? Every time I use it it says: Trouble resolving server name. WHAT does that mean? Please correct!
Blockspec:
('password for %s is %s ?' #b #username:password:)Code:
username: t1 password:t2
(HTTPSocket httpGet: 'contentshttp://scratch.mit.edu/api/authenticateuser? username=" , t1 , '&password=' , t2) contents = 'false' ifTrue: [ ^ false].
^ true
make sure you are connected to the internet and try again. if you are behind a firewall, add scratch as an exception.
Offline
as nathanprocks says, "trouble resolving server name" is the message given by Scratch when it tries to find a website and can't This could be caused by your internet connection, the site being down or the address being wrong
Offline
lu9 wrote:
Made something, that should be useful for card magic, or card playing:
http://oi54.tinypic.com/2a8p20j.jpg
It's a BYOB Block that reports any card, example:
Ace of Spades,
2 of Hearts,
King of Diamonds
Jack of Clubs... Etc. I Made from boredoom
I've put in "variables" because i won't know if it fits in any other thing.
[blocks]<say[ Please Add It!! ]for( 2 )secs>[/blocks]
BYOB comes with an other category for blocks that don't fit anywhere else. I think your block goes there. Could you supply a picture with the scripts to make that block?
Offline
SSBBM wrote:
lu9 wrote:
Made something, that should be useful for card magic, or card playing:
http://oi54.tinypic.com/2a8p20j.jpg
It's a BYOB Block that reports any card, example:
Ace of Spades,
2 of Hearts,
King of Diamonds
Jack of Clubs... Etc. I Made from boredoom
I've put in "variables" because i won't know if it fits in any other thing.
[blocks]<say[ Please Add It!! ]for( 2 )secs>[/blocks]BYOB comes with an other category for blocks that don't fit anywhere else. I think your block goes there. Could you supply a picture with the scripts to make that block?
There's a link behind the pic.
Offline
scimonster wrote:
There's a link behind the pic.
Oh. I must have missed that. But it doesn't have a report block. I'm guessing (join (join (number) (of) (image)))
Last edited by SSBBM (2011-08-30 10:32:30)
Offline
Hardmath123 wrote:
Please update these.
Offline
.
BYOB Blocks added: 5
Shared by Lu9, updated by SSBBM
Shared by Flashgocrazy, updated by Joefarebrother
Shared by Flashgocrazy, updated by Joefarebrother
Shared by Joefarebrother
Shared by Joefarebrother
Update carried out by block librarian: SSBBM
________________________________________________________________________________
^home
^updates archive
Last edited by YourLocalBlockLib (2011-08-31 20:16:09)
Offline
which one? i made 2.
Offline
nathanprocks wrote:
Squawkers13 wrote:
Remember the "password for _ is _ " block? Every time I use it it says: Trouble resolving server name. WHAT does that mean? Please correct!
Blockspec:
('password for %s is %s ?' #b #username:password:)Code:
username: t1 password:t2
(HTTPSocket httpGet: 'contentshttp://scratch.mit.edu/api/authenticateuser? username=" , t1 , '&password=' , t2) contents = 'false' ifTrue: [ ^ false].
^ truemake sure you are connected to the internet and try again. if you are behind a firewall, add scratch as an exception.
THAN WHAT IS THE RIGHT ADDRESS?
Offline
i'm sure that somebody has found this from the obselete blocks, but here it is:
blockSpecs:
('set stretch to %n%' #- #setStretchTo: 100)
it doesnt need a code.
Offline
SSBBM wrote:
Joefarebrother, should your (ancestor) block report nil like the (attribute[parent]) block if there is no ancestor.
no it should report itself
Offline
I have a block request! (or just a script)
I need (for panther) a (days since date () month () year ()) block. It needs to deal with leap years and different month lengths, thanks in advance :)
EDIT: This may help:
$Number$ is leap year?
|t2 t3|
t2_t1 / 4.
t3_ t1 / 4.
^ t2 rounded = t3.
Last edited by sparks (2011-09-02 17:31:41)
Offline
sparks wrote:
$Number$ is leap year?
|t2 t3|
t2_t1 / 4.
t3_ t1 / 4.
^ t2 rounded = t3.
That would be much more efficient as:
^ (t1/4) = (t1/4) rounded
Offline
sparks wrote:
I have a block request! (or just a script)
I need (for panther) a (days since date () month () year ()) block. It needs to deal with leap years and different month lengths, thanks in advance
EDIT: This may help:
$Number$ is leap year?
|t2 t3|
t2_t1 / 4.
t3_ t1 / 4.
^ t2 rounded = t3.
I'll work on that for you.
Last edited by SSBBM (2011-09-02 17:59:53)
Offline
you need to account for the fact that when a year ends with 00 it isn't a leap year unless it divides by 400.
Offline
Didn't know about that! Thanks for the information!
I present my revised script:
$Number$ is a leap year?
(t1/100) = (t1/100) rounded
ifTrue:[
(t1/400) = (t1/400) rounded
ifTrue:[
^ true
]
ifFalse:[
^ false
]
]
ifFalse:[
^ (t1/4) = (t1/4) rounded
]
Last edited by sparks (2011-09-03 07:16:49)
Offline
jurk wrote:
Can you save BYOB blocks In BYOB?
For example I make a Byob block And I like it And wont it again But I closed it can I Save a block
There's no such thing as a block file, but you can save the project or export the sprite. The downloadable BYOB blocks in the library are BYOB sprites.
Offline
So I've made it as far as working out how far apart two days in the same month are (I know, amazing huh?) But the months are the hardest because they're all different!
days between d:$Number$ m:$Number$ y:$Number$ and d:$Number$ m:$Number$ y:$Number$
t3 = t6 ifTrue:[ t2 = t5 ifTrue:[ ^(t4 - t1) ] ]
Offline
sparks wrote:
So I've made it as far as working out how far apart two days in the same month are (I know, amazing huh?) But the months are the hardest because they're all different!
days between d:$Number$ m:$Number$ y:$Number$ and d:$Number$ m:$Number$ y:$Number$Code:
t3 = t6 ifTrue:[ t2 = t5 ifTrue:[ ^(t4 - t1) ] ]
I've got to the point of it calculating it all with a BYOB script (I love my custom blocks!). But it take FOREVER to run. I have an idea to speed it up, but I haven't perfected it yet.
Last edited by SSBBM (2011-09-04 12:49:54)
Offline