Variable

This won't work:

[[Mine]]:
    var X = Math.ceil(Math.random()*8);
    squiffy.set("X",X);
You tried mining. [[next]]
[[next]]:
{if X=1:nothing}{if X=2:nothing}{if X=3:nothing}{if X=4:nothing}{if  X=5:stone}{if X=6:stone}{if X=7:stone}{if X=8:coal}

The section "next" is blank.


Take off the space between "{if " and "X=5:stone}", and it will work.

Another way to the same:

switch (Math.ceil(Math.random()*8)) {
case 8:
set ("output", 'coal');
break;
case 7:case 6:case 5: 
set ("output", 'stone');
break;
default:
set ("output", 'nothing');
}

{output}

Sugestion: put all your formulae in the master as functions, and invoque it as needed.


This topic is now closed. Topics are closed after 180 days of inactivity.

Support

Forums