Please add an else block by itself so that you don't have to add so many "if else" blocks.
I don't really see a use for this tbh
It would remove all the "if else" statements and make the code messy.
It would make code a lot cleaner that way.
I'm currently making a topic, I will reply in a sec
You can just do
if <not <condition>> {
}
in js?
@slate_technologies here
Also the "If not" block doesn't work @ego-lay_atman-bay because if you want this to execute when a lot of conditions aren't met, then you'd have trouble adding all those "and" blocks.
Can I add as many else statements as I want?
Also (offtopic) the squared block is basically just the "^" math operator but only allows for numbers to be squared...so it's essentially useless.
nope. This has already been solved in a different post. lemme find it one sec
which is the reason why I didn't think of marking this as my go-to solution.
I made a block similar to the library one.
<blocks app="Snap! 7, https://snap.berkeley.edu" version="2"><block-definition s="if %'bool' %'command' %'cases'" type="command" category="control"><header></header><code></code><translations></translations><inputs><input type="%b"></input><input type="%cs"></input><input type="%mult%b"></input></inputs><script><block s="doForEach"><l>case</l><block s="reportCONS"><block s="reportNewList"><list><block var="bool"/><block var="command"/></list></block><block var="cases"/></block><script><block s="doDeclareVariables"><list><l>passed</l></list></block><block s="doSetVar"><l>passed</l><block s="reportListItem"><l>1</l><block var="case"/></block></block><block s="doIf"><block s="reportOr"><block s="reportIsA"><block var="passed"/><l><option>reporter</option></l></block><block s="reportIsA"><block var="passed"/><l><option>predicate</option></l></block></block><script><block s="doSetVar"><l>passed</l><block s="evaluate"><block var="passed"/><list></list></block></block></script></block><block s="doIf"><block var="passed"/><script><block s="doRun"><block s="reportListItem"><l>2</l><block var="case"/></block><list></list></block><block s="doStopThis"><l><option>this block</option></l></block></script></block></script></block></script></block-definition><block-definition s="else if %'bool' %'command'" type="predicate" category="control"><header></header><code></code><translations></translations><inputs><input type="%boolUE"></input><input type="%cs"></input></inputs><script><block s="doReport"><block s="reportNewList"><list><block var="bool"/><block var="command"/></list></block></block></script></block-definition><block-definition s="else %'command'" type="predicate" category="control"><header></header><code></code><translations></translations><inputs><input type="%cs"></input></inputs><script><block s="doReport"><block s="reportNewList"><list><block s="reportBoolean"><l><bool>true</bool></l></block><block var="command"/></list></block></block></script></block-definition></blocks>
the man just wants an easy solution, importing custom block all the time is not easy, the library is, though
The blocks aren't command blocks, which is something I'm annoyed about. Why? Because now I can't add it to the main script.
it's not very hard seeing as how you would do this
which produces the same result as this
well, if the condition is false.
I said it is similar because I made it but shorter and understandable
No:((
Why are you posting a sad face?



