Jump to content

Error Reading Cartridge


Silly Walker

Recommended Posts

Error Reading Cartridge

 

System.applicationException: Exception of type 'System.ApplicationException' was thrown

at ZonesAuthor.LuaFunctions.ReadLuaCartridge(String luaFilename)

at ZonesAuthor.FrmMain.OpenCartridgeFile

 

This is the second time, it displays... how can I load my program? Or should I make my program for the third time? What am I doing wrong?

 

Thanks

Link to comment

Solved via private email.

 

It's the same problem over and over: the Builder isn't deleting functions it creates when the user deletes the item objects (this time) linked to the objects.

 

For instance, say you create an item called "coin". You double-click on the OnClick event and think to add code, but you decide against it, click "OK", and get back to the item screen. Later on or immediately after, you decide to delete the "coin" item. The Builder will delete the item from the lua file, but will not delete the OnClick function it made.

 

For me to solve this, it's a lot of trial and error. I select a group of functions and remove them from the lua file, then try to load the rest of the cartridge into the Builder. If it works, I copy a few more functions back into the cartridge until I come across something that doesn't work. I then look into it.

 

Perhaps I should create a program you can run yourself to fix the file? Hmm... That might be an idea. I'll get right on it.

Link to comment

Okay, that didn't take long to write an application to fix your problem. I haven't tested it on other cartridges I have fixed just yet, I ran out of time, but I'll upload it here to satisfy your curiosity. No warranties on it being the magic cure-all--it's not.

 

Two things to note: the file will not change your original cartridge file. Instead, it'll create a "_fixed.lua" file. For now, it will only check references in function names. If I find the references are elsewhere, I'll have to update the program. But it's a nice toy to play around with, I guess. And it took just long enough to write that I don't have to find something else to do tonight.

 

When I'm happy with how the program turned out, or it generates attention, I'll make a topic for it. If it does fix anyone's problem, a note of gratitude would be nice so I know I didn't just waste my time.

WherigoReferenceFixer.zip

Link to comment

Solved via private email.

 

It's the same problem over and over: the Builder isn't deleting functions it creates when the user deletes the item objects (this time) linked to the objects.

 

For instance, say you create an item called "coin". You double-click on the OnClick event and think to add code, but you decide against it, click "OK", and get back to the item screen. Later on or immediately after, you decide to delete the "coin" item. The Builder will delete the item from the lua file, but will not delete the OnClick function it made.

 

For me to solve this, it's a lot of trial and error. I select a group of functions and remove them from the lua file, then try to load the rest of the cartridge into the Builder. If it works, I copy a few more functions back into the cartridge until I come across something that doesn't work. I then look into it.

 

Perhaps I should create a program you can run yourself to fix the file? Hmm... That might be an idea. I'll get right on it.

 

I'd be curious to try out such a program. It's a nuisance when the builder won't delete the functions. :laughing::D:laughing:

Link to comment
I'd be curious to try out such a program. It's a nuisance when the builder won't delete the functions. :laughing::D:laughing:
Personally, I hope no one will have to use it. But there does seem to be a need. At least it might save me time when people send their cartridges to me for fixing. (While writing that last line, I felt like a mechanic...)
Link to comment

Unfortunately the small tool does not work for me i cannot open any file with it. I do have a cartridge with some exception errors. Up to 75% i tested the cartridge and worked fine but in the last part of programming it failed. Is it possible that somebody looks into it so i can solve the problem?

 

Greetz Ronald.

 

P.s. I can't upload the lua as i get a message. Still looking for some help.

Link to comment

Unfortunately the small tool does not work for me i cannot open any file with it. I do have a cartridge with some exception errors. Up to 75% i tested the cartridge and worked fine but in the last part of programming it failed. Is it possible that somebody looks into it so i can solve the problem?

 

Greetz Ronald.

 

P.s. I can't upload the lua as i get a message. Still looking for some help.

That's fine, just send it to me. You can only upload zip files to the form.

 

Did you unzip the tool? Do you have .Net 2 (same version the Builder needs) installed on your system? Can you click "Browse" to get to the file you need? Are you trying to find the file on a network drive? So many questions to figure out what you mean by saying you can't open any file with it.

Link to comment

Unfortunately the small tool does not work for me i cannot open any file with it. I do have a cartridge with some exception errors. Up to 75% i tested the cartridge and worked fine but in the last part of programming it failed. Is it possible that somebody looks into it so i can solve the problem?

 

Greetz Ronald.

 

P.s. I can't upload the lua as i get a message. Still looking for some help.

That's fine, just send it to me. You can only upload zip files to the form.

 

Did you unzip the tool? Do you have .Net 2 (same version the Builder needs) installed on your system? Can you click "Browse" to get to the file you need? Are you trying to find the file on a network drive? So many questions to figure out what you mean by saying you can't open any file with it.

 

Ok thx i will send it to you i am gratefull.

As for the tool.

 

I unzipped, i have Net2, i can click browse, then i can find the file and click open but then it won't appear in the open line of the tool. If you still click the try to fix button it says select file.

I tried with the normal browse option, i tried dragging the file and i tried copying the adress bun none works.

I work with Vista.

 

Greetz Ronald

Link to comment

Just wanted to say thanks for posting this tool. I had an issue where Builder would read the .lua file OK, but then would throw System.applicationException when trying to actually build a cartridge. Thanks to this tool I was able to determine that changing my cartridge name failed to change my catridge OnStart event.

 

And FWIW, I had the same problem with the dialogue form on WinXP -- the browse button didn't seem to want to put anything in the form's entry box. I just typed the full pathname of the file in manually and it worked fine.

Link to comment

Thank you for the compliment. I'm glad to know it saved someone some frustration!

 

That is odd. Like bugs with the Builder, if I can replicate it on my computer, I can usually fix the problem. I'll play around with it next month when I'm not buried in haunted attraction photos. (That sort of work is also affecting my precious geocaching time!)

Link to comment

There was one time I was helping someone with his cartridge. He had what he wanted message boxes to say already written out in MS Word. It included some formatting. I tried copying that text and pasting it into the message box text area. It pasted and the cartridge ran just fine. However, opening and simply saving the lua file from notepad messed it all up.

 

Just an FYI to anyone else who finds him or herself in the same situation and wondering.

Link to comment

It depends on what characters are in your cartridge. If you have standard ASCII text, anything you can type in on an American keyboard, you're fine using notepad; it won't mess it up. Once the character set changes to unicode, though, notepad will have problems.

 

If you're using international characters or pasting symbols, such as the directional quotes and apostrophes MS Word uses, you'll be using some form of unicode. Instead of notepad, use wordpad to edit your lua code. Just as with notepad, wordpad is also included with MS Windows.

 

I tested this against the problem I mentioned in the previous post. Saving the cartridge in notepad did cause the Builder error. Saving it in wordpad, however, did not result in an error when I tried opening the cartridge in the Builder.

 

It's good information to know and thanks for asking the question. While I've had my suspicions, your question prompted me to confirm them.

Link to comment

It depends on what characters are in your cartridge. If you have standard ASCII text, anything you can type in on an American keyboard, you're fine using notepad; it won't mess it up. Once the character set changes to unicode, though, notepad will have problems.

 

If you're using international characters or pasting symbols, such as the directional quotes and apostrophes MS Word uses, you'll be using some form of unicode. Instead of notepad, use wordpad to edit your lua code. Just as with notepad, wordpad is also included with MS Windows.

 

I tested this against the problem I mentioned in the previous post. Saving the cartridge in notepad did cause the Builder error. Saving it in wordpad, however, did not result in an error when I tried opening the cartridge in the Builder.

 

It's good information to know and thanks for asking the question. While I've had my suspicions, your question prompted me to confirm them.

 

Thanks for checking that for us! I'm pretty sure that's what caused my new cartridge to suddenly fail last night.

Link to comment

I am also having troubles opening up the file to repair. I hit browse and go to the file and highlight it and click open but it does not appear in the window so when I click on "Try to fix my cartridge" I get a please select a file.

 

Any help would be appreciated

I did what Jeffnerner suggested by typing in the path and got the app to run, and it gave me a fixed file, but I still get the same error messages.

Any help would be appriciated.

Link to comment

I'm getting this error as well. The strange thing is, I've ONLY entered the name and location. Haven't done any other messing around at all. Yet still, I can save the cartridge no problem, but when I go to open it, I get the following error message:

 

U1iuMh3.jpg

 

Also, I tried opening the "Zooventure" cartridge that's provided by the Wherigo Builder Tutorial as an experiment... I get the same error. This makes me think it's an issue with the Builder itself (or my specs...?). It seems obvious to me that there wouldn't be errors in both my bare cartridge AND the tutorial cartridge. Anyone have any insight?

Link to comment

I have a problem with the emulator crashing. The error was:

Lua error C:\.....file. enc:3617:attempt to index global"zitemPapersidetableBonDeskinC" (a nil value)

The item it states seems to be a combo of two items "Paper side table B" and "Paper on Desk in C" . Anyways I ran the Wherigo reference fixer and the emulator does not crash now however the fixer removed all the coding at the start of the cartridge.

Not sure if this is related or not, but the way I have been placing objects in zones or on the player was to do that at the beginning of the cartridge through coding. I then noticed you can actually place objects in the zones you want when you create the object.

 

Question 1 would be: Did I mess up the emulator by placing the object in a zone from it's property page?

 

Question 2: If there are more than one item in the zone and they are both centered (or basically on top of each other) does that mess things up.

 

Question 3: Which is better, place the items in the zone via properties page or code the placement at the beginning of the cartridge?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...