There are a number of syntax issues/errors with your example:
1. The (else:) macro doesn't accept a parameter.
Generally if you need to check for a series of related conditions then you would use an (if:) macro and an (else-if:) macro structure like the following:
(if: $variable is "value")[
... Do something ...
]
(else-if: $variable is "different value")[
... Do other thing ...
]
... but in your particular case you don't need to use an (else-if:) macro because the variable can only have one of two values (true or false), so you can use a structure like the following instead.
(if: $variable is "value")[
... Do something ...
]
(else:)[
... Do other thing ...
]
2. You don't need to (and shouldn't) use the IS comparison operator when checking if a value is true or false.
Instead you should do one of the following depending if you're checking for Boolean true or false
(set: $variable to true)
(if: $variable)[This texts appears when the value in the varirable equates to Boolean true.]
(set: $variable to false)
(if: not $variable)[This texts appears when the value in the varirable equates to Boolean false.]
... the second above example is using the Boolean Data's NOT operator.
3. You only need to use a single set of Collapsing whitespace markup to achieve the result you require.
The following is a revised version of your original example that takes into consideration the above issues.
{
(if: $fireball)[
[[Scream]]
[[Punch]]
[[Cast fireball]]
]
(else:)[
[[Scream]]
[[Punch]]
]
}
... and if entered into an empty passage should result in the creation of the three related Passages (if they are currently missing from the story's Passage Map)