Author Topic: Big arrays in Companion  (Read 6097 times)

0 Members and 1 Guest are viewing this topic.

Offline gumby

Big arrays in Companion
« on: September 04, 2014, 06:12:10 PM »
I ran into this today.  For some reason, the template game is dumping on me when I try to use an array that I've defined with an index over (about) 2000.

Here's my code
Code: [Select]
(local
   roomMap[2460]
)

-- then in the init of my room:
(for (= i 0) (< i 2460) (++i)
     = roomMap[i] 1
)


If I change my loop to only iterate say 2000 times, it's fine.  I tested this out in Studio and it seemed to work fine (no crashing) so it seems to only be impacting Companion.

EDIT:  I can change the loop to go up to 2024 before the game starts corrupting.  Starting at 2025, the top menu gets corrupted.
« Last Edit: September 04, 2014, 06:52:39 PM by gumby »


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

Offline Collector

Re: Big arrays in Companion
« Reply #1 on: September 04, 2014, 08:11:48 PM »
A difference in the compilers?
KQII Remake Pic

Offline gumby

Re: Big arrays in Companion
« Reply #2 on: September 05, 2014, 08:50:45 PM »
Yeah, looks like it.  I'd like my new script to work in Studio & Companion, so I may just need to create 2 arrays at half the size.
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.034 seconds with 18 queries.