Community
SCI Programming => SCI Syntax Help => Topic started by: Doan Sephim on July 13, 2023, 07:22:27 PM
-
Don't crucify me here! Yes, I'm coding Betrayed Alliance Book 1 is Studio Script, but only because the project is older than Sierra Script and the migration process would be more burdensome than it's worth. Don't worry, Book 2 is in Sierra Script!
All that said. I was trying to migrate the "look/item" from Book 2 into book 1 and hit a snag...apparently there is no "cond" conditional in Studio Script! Does anyone know if there is a functional alternative? I'm trying to migrate the following code over:
(if (Said 'look>')
(cond
((= i (gInv saidMe:))
(if (i ownedBy: gEgo)
(i showSelf:)
else
(PrintDontHaveIt)
)
)
)
)
-
It would seem there is no cond in SCI Studio. You'll have to use a chain of if-else-ifs.
-
Ah, how regrettable...serves me right for never converting to Sierra Script!
-
Did you use the conversion built into Companion? Probably a lot of work to fix what gets broken by it, but it might do a lot of the work for you.
-
Did you use the conversion built into Companion? Probably a lot of work to fix what gets broken by it, but it might do a lot of the work for you.
Yes, I had tried that in the past but it was quite a lot of headache...too much for me at the time... probably too much work still. But now I'm feeling like I'm missing out on something important not being able to use cond to make this simple and elegant code for looking at inv items
-
I tried converting it last night on the last build you sent me and it compiled with only one error. It ran, but crashed with an error: "pic.-23772 not found." Didn't feel like tracking it down.