Discuss Scratch

WaffleCODEZ
Scratcher
66 posts

COMMON QUESTIONS ANSWERED / HELP FAQ

Sorry if this is a bad question, this is my first extension.
I want to set my reporter (waffles) to an option with a dropdown menu (the options would be “taste good” and “don't taste good” (yes I notice this extension is silly))
How would I do that at all?
My code is -

(function(ext) {
   
    ext._shutdown = function() {};
    // Status reporting code
    
    ext._getStatus = function() {
        return {status: 2, msg: 'Ready'};
    };
        
    };
	  ext.go_to_link = function(website) {
        window.location.href = website;
	  };
	  
    // Blocks
    var descriptor = {
        blocks: [
		// Block type, block name, function name
		 ['h', 'when waffles are not good', 'when_waffles'],
		 [' ', 'Go to site %s', 'go_to_link', 'https://scratch.mit.edu'],
		 ['r', 'waffles', 'wafflesvar'],
		
		
        ]
    };
    // Register-er!
    ScratchExtensions.register('WaffleScratch', descriptor, ext);
})({});


Please help!

Last edited by WaffleCODEZ (May 26, 2018 17:54:56)


      U^ェ^U  ~ I'm Blocky, waffle's signature assistant! I protect his signature!  :: #1a1a1a cap
My new game? I'm working on it!

Donate an Internet!

















__________
| | | | | | | | <——- A Waffle (me)
| | | 0 | 0 | |
| | | |O | | |
|_|_|_|_|_|_|_|
savaka
Scratcher
1000+ posts

COMMON QUESTIONS ANSWERED / HELP FAQ

WaffleCODEZ wrote:

Sorry if this is a bad question, this is my first extension.
I want to set my reporter (waffles) to an option with a dropdown menu (the options would be “taste good” and “don't taste good” (yes I notice this extension is silly))
How would I do that at all?
If you put your code in [code] tags (or more specifically [code=js] tags for JS syntax highlighting) it will display correctly
for example
alert('hey');
(if you quote you can see the tag formatting)
ideapad-320
Scratcher
100+ posts

COMMON QUESTIONS ANSWERED / HELP FAQ

what kind of js

Powered by DjangoBB

Standard | Mobile