LiveCode Crashes when Loading

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
HappyCode
Posts: 2
Joined: Fri May 17, 2013 4:32 pm

LiveCode Crashes when Loading

Post by HappyCode » Fri May 17, 2013 4:35 pm

I download LiveCode because I read that it can open old hypercard stacks, I have an old hypercard stack that I made 15 years ago and wanted to convert it into an exe. When I try to load it though, the livecode program just closes, I have another hypercard stack from the same time but it's smaller, more simple, it loads up fine but I see no option to "Save as"

could someone point out what I am doing wrong and how to correct these issues?
I tried finding the error log but I don't know where it stores it.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: LiveCode Crashes when Loading

Post by jacque » Fri May 17, 2013 5:46 pm

The most common reason is that the stack wasn't compacted in HyperCard before being opened in LiveCode. You'll need to find a way to do that first. SheepShaver works pretty well if you don't have an OS 9 machine.

When LiveCode opens a HC stack it is already a copy. Just choose Save from the File menu and save normally. If you don't save it you'll lose the conversion.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

HappyCode
Posts: 2
Joined: Fri May 17, 2013 4:32 pm

Re: LiveCode Crashes when Loading

Post by HappyCode » Thu May 23, 2013 2:32 am

Thanks! I tried to compact it in hypercard using Basilisk II, but hypercard reported an error 5454 so I re-built the stack by copying each card and pasting it into a new stack, compacting each time. This worked well, but when I open it up in livecode there's some code that isn't recognized and sounds don't work.

within the stack are sounds (i can see them in resource fork on the mac emulator) but they don't play in livecode, and livecode gets confused about the khz option Play "sound" 25khz for example, it doesn't understand 25khz and breaks on this. If I just remove the 25khz and leave Play "sound" then it works (but no sound actually plays)

I'll fiddle with it a bit and see what I can salvage, it's pretty cool being able to cross a hypercard stack over even if I can't get all functions working

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: LiveCode Crashes when Loading

Post by jacque » Thu May 23, 2013 3:22 pm

Good, you're in now. The errors are to be expected, there are some differences in how the LiveCode engine works. Also, not all resources are copied over; basically only icons that have been imported into the HC stack will come over and a few other resources. Since sounds in LiveCode require a specific format that isn't the same as HC's resource fork format, those do not import. You will need to save them as aif, au, or wav sounds and re-import them. You won't have as much control over those, they will only play at their natural rate. It is much better to leave your sound resources as separate sound files and use a player object to play them back, you'll have more control that way.

I have an extensive tutorial on converting HC stacks to LiveCode which explains the differences and what you'll need to deal with. LiveCode is a little pickier than HC was about some things (always quote literals!) and some things like menus are done so differently that it is easier to remove those scripts before importing than to fix them afterward to avoid all the compilation errors.

The tutorial is here:

http://www.hyperactivesw.com/mctutorial ... altoc.html

It was created a long time ago but it's still accurate even though some of the screen shots are outdated.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply