Author Topic: SCI Studio & switch statements  (Read 3830 times)

0 Members and 1 Guest are viewing this topic.

Offline gumby

SCI Studio & switch statements
« on: April 30, 2012, 10:10:57 PM »
I don't expect anyone else to hit this limitation, but the implementation of the 'switch' statement in SCI Studio only supports up to 48 case statements within it.


In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Collector

Re: SCI Studio & switch statements
« Reply #1 on: April 30, 2012, 10:19:48 PM »
Have you found a limit in Companion?
KQII Remake Pic

Offline gumby

Re: SCI Studio & switch statements
« Reply #2 on: May 01, 2012, 08:47:31 AM »
I'll check.  May have also been a character limit I hit within a switch statement, rather than the number of cases within it.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline gumby

Re: SCI Studio & switch statements
« Reply #3 on: May 01, 2012, 07:22:25 PM »
For Studio, it's definitely the number of case statements in a switch - 48.  It won't even compile the script.  Companion doesn't have any obvious limit, I went over 1000 case statements within a switch & it happily compiled it.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline Collector

Re: SCI Studio & switch statements
« Reply #4 on: May 01, 2012, 08:37:46 PM »
I think most have turned to Companion for similar reasons.
KQII Remake Pic

Offline Cloudee1

Re: SCI Studio & switch statements
« Reply #5 on: May 02, 2012, 12:12:32 AM »
If I remember correctly, studio won't compile more than 12 succesfully. It  acts like it does but run time is a different story. Companion is the way to go when it comes to switch cases. This was one of my first problems I  ran into back in the day with Spongebob adventurepants... Studio  won't even think about compiling the black cauldron because of all the case statements in the inventory script.
Halloween Competition Brass Lantern Prop Competition Groundhog Day Competition

Offline gumby

Re: SCI Studio & switch statements
« Reply #6 on: May 02, 2012, 08:49:56 AM »
In my instance, I can get away with just using if statements instead (each case resulted in a return, so I don't need nested if/else logic).  I guess I'll avoid using switches in Studio entirely.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition


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

Page created in 0.266 seconds with 23 queries.