Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

The (if:) command should be assigned to a variable or attached to a hook.► Macros like this should a

$
0
0
I have limited education on coding so bare with me on the lingo as I will probably use it incorrectly, but I get this error message all the time on what seems like very basic code statements involving if and else. Copied and pasted below is one of many pieces of code I have that gives the same error, feel free to let me know whats going on here and in general so I can apply to other code as well please.

I am basically trying to set up a (if your Wisdom score is 9 or higher, a link will be displayed to take you to the 'create a cleric' passage, else, text stating that the class is unavailable is displayed).

The error occurs after the line ...
Cleric ~ (if: $Wis>8)(set: $WisTemp1= "Available")(else:)(set:$WisTemp1= "Unavailable")

Code for whole passage is as follows:

{
(set: $Str=((random:1,6)+(random:1,6)+(random:1,6)))
(set: $Int=((random:1,6)+(random:1,6)+(random:1,6)))
(set: $Wis=((random:1,6)+(random:1,6)+(random:1,6)))
(set: $Dex=((random:1,6)+(random:1,6)+(random:1,6)))
(set: $Con=((random:1,6)+(random:1,6)+(random:1,6)))
(set: $Cha=((random:1,6)+(random:1,6)+(random:1,6)))
(set: $StatArray=(a:$Str,$Int,$Wis,$Dex,$Con,$Cha))
(set: $PP=0)
(set: $GP=(((random:1,6)+(random:1,6)+(random:1,6))*10))
(set: $EP=0)
(set: $SP=0)
(set: $CP=0)
}
**CHARACTER SHEET**

**Attributes**
STRENGTH: (print:$Str)
INTELLIGENCE: (print:$Int)
WISDOM: (print:$Wis)
DEXTERITY: (print:$Dex)
CONSTITUTION: (print:$Con)
CHARISMA: (print:$Cha)

**Coins**
PP: (print: $PP)
GP: (print: $GP)
EP: (print: $EP)
SP: (print: $SP)
CP: (print: $CP)

**Class Choices**

Cleric ~ (if: $Wis>8)(set: $WisTemp1= "Available")(else:)(set:$WisTemp1= "Unavailable")

Elf ~
Dwarf ~
Fighter ~
Halfling ~
Magic-User ~
Thief ~

[[Reroll Character|Roll a Character]]

Viewing all articles
Browse latest Browse all 1844

Trending Articles