Conditionals in Init.txt
Posted: Saturday, 5th May 2012, 03:12
Can anyone explain how you're supposed to get conditional statements working in init.txt? I decided to try and experiment with automating some of the inscriptions I do, but Crawl just seems to ignore my if statements and executes what's inside whether they're true or not.
A simple (if useless) example- autoinscribe books with !r if you're a Troglodyte.
Problem? It autoinscribes all books with !r, regardless of religion. What am I doing wrong?
How do the you.foo terms work? Are they all functions? Ie, you.foo(test) returns true if you test the right value? Or are they variables I have to check with == etc? A list of all the you.foos aviable would be nice too- I'm not sure what I have to work with.
A simple (if useless) example- autoinscribe books with !r if you're a Troglodyte.
Problem? It autoinscribes all books with !r, regardless of religion. What am I doing wrong?
How do the you.foo terms work? Are they all functions? Ie, you.foo(test) returns true if you test the right value? Or are they variables I have to check with == etc? A list of all the you.foos aviable would be nice too- I'm not sure what I have to work with.