Author Topic: Is there no cond in Studio Script?  (Read 677 times)

0 Members and 1 Guest are viewing this topic.

Offline Doan Sephim

Is there no cond in Studio Script?
« 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:
Code: [Select]
(if (Said 'look>')
(cond
((= i (gInv saidMe:))
(if (i ownedBy: gEgo)
(i showSelf:)
else
(PrintDontHaveIt)
)
)
)
)


Artificial Intelligence Competition

Online Kawa

Re: Is there no cond in Studio Script?
« Reply #1 on: July 14, 2023, 06:47:29 AM »
It would seem there is no cond in SCI Studio. You'll have to use a chain of if-else-ifs.

Offline Doan Sephim

Re: Is there no cond in Studio Script?
« Reply #2 on: July 14, 2023, 02:04:46 PM »
Ah, how regrettable...serves me right for never converting to Sierra Script!

Offline Collector

Re: Is there no cond in Studio Script?
« Reply #3 on: July 14, 2023, 03:30:36 PM »
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.
KQII Remake Pic

Offline Doan Sephim

Re: Is there no cond in Studio Script?
« Reply #4 on: July 15, 2023, 12:23:19 AM »
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

Offline Collector

Re: Is there no cond in Studio Script?
« Reply #5 on: July 15, 2023, 07:40:47 AM »
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.
KQII Remake Pic


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.041 seconds with 23 queries.