Here's a weird bug; somehow, when I replaced an if with an if else in a boolean block, it reported "nil" instead of true or false. Any idea why?
Last edited by Jwosty (2010-02-11 23:22:26)
Google it.
Offline
Hi Jwosty,
I'm suspecting that you let your boolean block report some kind of answer (that's the field labelled "report" at the bottom of the Block Editor). Often what you do is create a block variable named "answer" or "result", and then set that variable's value in the block definition's script. Since block variables are always initialized to zero you have to make sure that you assign a boolean value to them in the definition script before letting the definition report them. I'd therefore recommend checking all conditionals for whether your return variable (provided that you use one) gets assigned a boolean value.
Oh, I might not be making myself overly clear here, sorry. Could you perhaps post either a screenshot or a textual description of your boolean block definition? I'd like to have a look at this. Thanks!
Offline
I'm working on a strategy game about Alexander II of Macedon and I need to be able to copy and delete in the game itself. I had thought that someone had posted a forum about using your BYOB to make a block that could do this but after going through the entire Advanced Forums I was unable to find it.
I realise that it's pobably laughably easy to do this and I probably sound like the biggest idiot asking this but if you (or anyone else on this forum) could help me out with doing this I would be hugely helpful.
Offline
sapientsnail wrote:
I'm working on a strategy game about Alexander II of Macedon and I need to be able to copy and delete in the game itself. I had thought that someone had posted a forum about using your BYOB to make a block that could do this but after going through the entire Advanced Forums I was unable to find it.
I realise that it's pobably laughably easy to do this and I probably sound like the biggest idiot asking this but if you (or anyone else on this forum) could help me out with doing this I would be hugely helpful.
You could also use lists,if you mean using items.A list is often called an array in other languages,and it's just what it sounds like;a "list" you can add and subtract things from,even during a game.Combined with an ask block,you can create a basic inventory.
Offline
Hi sapientsnail,
it's cool that you're checking out BYOB! However, if you're looking for a way to copy or delete sprites in a Scratch script (some call that "cloning") that's not yet part of BYOB. Instead I'd like to encourage you to try working with lists (thanks for pointing this out, Brass45!) in regular Scratch. It's a bit cumbersome, because Scratch lists cannot contain sprites, only their names, but I'm sure you'll find a way
Please don't hesitate to ask again, if you get stuck with your history project!
Offline
Hey Jens, Is There ANY Way To Get Blocks You Made From BYOB Onto The Scratch Website? I Want To Share The Blocks I Have Made In BYOB, Like The Previous Costume Block. Please Help!
Offline
TheGameMaster1231 wrote:
Hey Jens, Is There ANY Way To Get Blocks You Made From BYOB Onto The Scratch Website? I Want To Share The Blocks I Have Made In BYOB, Like The Previous Costume Block. Please Help!
I would just put the block you made in a sprite (Maybe use a screen capture as the costume) and export the sprite, then upload it to somewher elike www.mediafire.com and upload a project with a link or maybe have a thread on the forums containing all the links.
Offline
markyparky56 wrote:
TheGameMaster1231 wrote:
Hey Jens, Is There ANY Way To Get Blocks You Made From BYOB Onto The Scratch Website? I Want To Share The Blocks I Have Made In BYOB, Like The Previous Costume Block. Please Help!
I would just put the block you made in a sprite (Maybe use a screen capture as the costume) and export the sprite, then upload it to somewher elike www.mediafire.com and upload a project with a link or maybe have a thread on the forums containing all the links.
I Don't Want To Do That, Because I Actually Want People To Actually Be Able To Use It In Their Projects. But Thanks Anyway. I'm Gonna Have To Wait And See What Jens Has To Say About It.
Offline
Hi TheGameMaster1231,
I already answered this question directly, but since this seems to be an issue for many people I'll answer it once more here: BYOB is an experimental prototype. We're currently expanding it with first class procedures and first class lists and some other big ideas taken from LISP/Scheme, so it can be used in a university course. BYOB is, however, not supported by the online Scratch Java player of the website. Therefore you cannot post BYOB projects to the Scratch website. It's a big drawback, I know. You can, however, compile your BYOB projects into standalone Windows .exe's and share them elsewhere.
Offline
Jens wrote:
Hi TheGameMaster1231,
I already answered this question directly, but since this seems to be an issue for many people I'll answer it once more here: BYOB is an experimental prototype. We're currently expanding it with first class procedures and first class lists and some other big ideas taken from LISP/Scheme, so it can be used in a university course. BYOB is, however, not supported by the online Scratch Java player of the website. Therefore you cannot post BYOB projects to the Scratch website. It's a big drawback, I know. You can, however, compile your BYOB projects into standalone Windows .exe's and share them elsewhere.
I Said ANY Way. That Includes Hacking It Into A Scratch Project Or Something. Does THAT Work?
Offline
could you let it instead of upload convert to java (as scratch does) so we can tweak java script?
Offline
TheGameMaster1231 wrote:
markyparky56 wrote:
TheGameMaster1231 wrote:
Hey Jens, Is There ANY Way To Get Blocks You Made From BYOB Onto The Scratch Website? I Want To Share The Blocks I Have Made In BYOB, Like The Previous Costume Block. Please Help!
I would just put the block you made in a sprite (Maybe use a screen capture as the costume) and export the sprite, then upload it to somewher elike www.mediafire.com and upload a project with a link or maybe have a thread on the forums containing all the links.
I Don't Want To Do That, Because I Actually Want People To Actually Be Able To Use It In Their Projects. But Thanks Anyway. I'm Gonna Have To Wait And See What Jens Has To Say About It.
![]()
But that way people could actualy use it in their projects by importing it into their projects and using the block from their.
Jens, does the chirp compiler work with BYOB blocks?
Offline
markyparky56 wrote:
TheGameMaster1231 wrote:
markyparky56 wrote:
I would just put the block you made in a sprite (Maybe use a screen capture as the costume) and export the sprite, then upload it to somewher elike www.mediafire.com and upload a project with a link or maybe have a thread on the forums containing all the links.
I Don't Want To Do That, Because I Actually Want People To Actually Be Able To Use It In Their Projects. But Thanks Anyway. I'm Gonna Have To Wait And See What Jens Has To Say About It.
![]()
But that way people could actualy use it in their projects by importing it into their projects and using the block from their.
Jens, does the chirp compiler work with BYOB blocks?
i don't think so.... *bump*
Offline
Hi all,
Yes, the Chirp Compiler (Scratch2Exe) *does* work with BYOB blocks! You can share your BYOB projects as exe's by compiling them with Scratch2Exe. You can also use BYOB's internal compiler (under the SHARE menu), which really is the same.
Offline
Jens i was making an experimental converter for BYOB actually it converts BYOBs file into C++ just wanted to ask that will you like to help with the squeak and Image processing part it till now works like this
Theory:
it sees the code say its reading the say block so it will do like it will use the out text function from GRAPHICS.h
it makes each sprite a class and its functions and variables (private ) as class function and variables the global are the globals and it could be called an interpreter will you help
Offline
fanofcena wrote:
Theory:
it sees the code say its reading the say block so it will do like it will use the out text function from GRAPHICS.h
That bit makes no sense to me, it might just be my lack of programming knoledge, but it seems to be lacking in grammer.
Offline
markyparky56 wrote:
fanofcena wrote:
Theory:
it sees the code say its reading the say block so it will do like it will use the out text function from GRAPHICS.hThat bit makes no sense to me, it might just be my lack of programming knoledge, but it seems to be lacking in grammer.
Ah not grammer problem
it uses outtext() function from graphics.h
Offline
fanofcena wrote:
markyparky56 wrote:
fanofcena wrote:
Theory:
it sees the code say its reading the say block so it will do like it will use the out text function from GRAPHICS.hThat bit makes no sense to me, it might just be my lack of programming knoledge, but it seems to be lacking in grammer.
Ah not grammer problem
it uses outtext() function from graphics.h
You dont need the Like in there is what i think is confusing me.
Offline
fanofcena wrote:
Jens i was making an experimental converter for BYOB actually it converts BYOBs file into C++
Fanofcena, I'm very interested in what you are developping. Would like to share your code?
Offline
jcubed wrote:
the sprite you start out with is at 1,1 not 0,0
No, it's 1,-1, and not 1,1.
Offline
s_federici wrote:
fanofcena wrote:
Jens i was making an experimental converter for BYOB actually it converts BYOBs file into C++
Fanofcena, I'm very interested in what you are developping. Would like to share your code?
Yes for sure i would like to share but its like a new version of scratch on C++ till now
Offline
fanofcena wrote:
Yes for sure i would like to share but its like a new version of scratch on C++ till now
![]()
Very good. Do you have a link from where I can download it? If not, just go to http://www.sitibs.com/branches/moodle/mod/assignment/view.php?id=3281, login as user studente221 (password studente221) and upload it. Thanks!
Offline
s_federici wrote:
fanofcena wrote:
Yes for sure i would like to share but its like a new version of scratch on C++ till now
![]()
Very good. Do you have a link from where I can download it? If not, just go to http://www.sitibs.com/branches/moodle/mod/assignment/view.php?id=3281, login as user studente221 (password studente221) and upload it. Thanks!
Well if u know C++ and has a c++ compiler then i can upload it else its of no use as i havent compiled it due to lack of squeak file support in the applet > (SOME ONE PLZ HELP WITH .sb part i will do the rest)
Offline
fanofcena wrote:
if u know C++ and has a c++ compiler then i can upload it else its of no use
Yes, I'm much more proficient in C++ than Smalltalk.
Offline
fanofcena wrote:
somelia wrote:
Paddle2See wrote:
Jens, this is simply amazing! Astounding! Incredible! The first routine I made was "Previous Costume" - it felt so good to be able to hide that ugly equation neatly away in a routine where it belongs! From my first baby steps, I will now stride forth confidently. Thank you!
How on earth did you do a "previous costume" block?!?!
Its simple make a block in byob and enter the command.
switch to costume (costume - 1)
Oh!
Offline