Code: Select all
<!--First CODE Block-->
[foreach(item, listOfItems),CODE:
{
<!--Second CODE block, nested inside first-->
[if(item == "Spear"),CODE:
{
[operation1 = "The item is a "+item]
[operation2 = 5 + 9]
};
{
[operation1 = "The item is not a "+item]
[operation2 = 10+6]
}]
}]
Code: Select all
<!--First CODE block-->
[foreach(item, listOfItems),CODE:
{
<!--Second CODE Block-->
[if(item == "Spear"),CODE:
{
<!--Third CODE Block - one nesting level too deep! -->
[if(itemType = "LongSpear"), CODE:
{
[operation0 = "You get a +2 bonus with "+itemType]
}]
[operation1 = "The item is a "+item]
[operation2 = 5 + 9]
};
{
[operation1 = "The item is not a "+item]
[operation2 = 10+6]
}]
}]
Be aware that the nesting limit is based on how deeply nested the { } are in the code - therefore, any use of { } counts toward the nesting limits. So:
Code: Select all
[if(condition),CODE:
{
[if(condition2),CODE:
{
The second condition has a value of {value}
}]
}]