16
SCI Syntax Help / Printing from Text Resources
« on: January 15, 2019, 12:24:05 PM »
Hi All, I have another newbie question. The forums here, the tutorials, and the SCI Documentation links have all been great, and I've been learning a lot, but it seems like I keep turning around and getting caught up on the simplest of things 
If I want to Print from a text resource, I believe that I just need to Print (a b) where a is the text resource number and b is the entry. However, when I try this in my script like so:
(if (Said 'look>')
(if (Said '/bed') (Print "5 2"))
(if (Said '/dresser') (Print "5 4"))
(if (Said '/floor') (Print (5 7)))
(if (Said '/rug') (Print (5 9)))
"bed" and "dresser" correctly display the numbers (I was just making sure the rest of the syntax was alright), but if I try to compile while floor and rug aren't commented out, I receive an "Expected an expression" error. As the attached shows, I do have a text resource for 005, and it's got 15 entries so far to cover any of the attempted calls. I tried putting 005 in lieu of 5, though I don't think it should matter, but no luck.
Do I need to call or reference text resources somewhere before I can use them in the script? Or am I just doing something all sorts of wrong? Thanks!

If I want to Print from a text resource, I believe that I just need to Print (a b) where a is the text resource number and b is the entry. However, when I try this in my script like so:
(if (Said 'look>')
(if (Said '/bed') (Print "5 2"))
(if (Said '/dresser') (Print "5 4"))
(if (Said '/floor') (Print (5 7)))
(if (Said '/rug') (Print (5 9)))
"bed" and "dresser" correctly display the numbers (I was just making sure the rest of the syntax was alright), but if I try to compile while floor and rug aren't commented out, I receive an "Expected an expression" error. As the attached shows, I do have a text resource for 005, and it's got 15 entries so far to cover any of the attempted calls. I tried putting 005 in lieu of 5, though I don't think it should matter, but no luck.
Do I need to call or reference text resources somewhere before I can use them in the script? Or am I just doing something all sorts of wrong? Thanks!