Jump to content

Placing items and Characters in Zones


Zorkan_Heneron

Recommended Posts

I have a question about placing items and characters in zones.

Is it better to place them in zones from the item's info sheet or with the move command at the beginning of the cartridge?

The reason I am asking is, I was doing it with move commands at the beginning of the cartridge and then discovered the feature on the item and character sheets to place them in zones from there. I started doing it that way and now my emulator crashes with this error:

 

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" .

 

Not sure what I did wrong. Any help would be greatly appreciated.

Link to comment

You didn't mention, what builder do you use. So I expect it is the Groundspeak builder.

 

If so, open your Lua file and go to line 3617. There you should find the word "zitemPapersidetableBonDeskinC". Replace this by a valid item name ("zitemPapersidetableB"). Save the file. It would be good, to make a backup before doing this.

 

Because the problem is at such a high line number, I think it is a problem in the author script or the OnStart event, which you introduced.

 

Btw. it is nearly the same to set the items at definition in the right zone or move them in the OnStart event to the destination. The first is a little bit faster B) .

Link to comment

Again a hardcore programmer <_< I think the name of the task causes this error. Don't use white spaces or too long names.

I always place items and characters in the zones at the beginning. There is rarely a reason to use a move. For example if there is figure "who goes with you". Then you have to move it from one zone to another. Or you use a couple of figures and place them in a couple of zones. This seems to be the better way, because each of the figures can have their own dialoges.

Otherwise you must ask for something like :

if ZoneA contains Player message "Welcome in ZoneA"

if ZoneB contains Player message "Welcome in ZoneB"

...

Link to comment

How do I find line 3617? There are no numbers beside the lines. I used the Groundspeak Builder.

 

Sorry, forgot to explain it better. You should use a text editor to open the Lua file. In the most editors, you could see the line number. So you could navigate to the right line. Check, if the item name in this line exists. If not, than correct it and save it. Don't forget the backup before doing this.

Link to comment

Thanks for your reply charlenni. I found the offending line and carefully changed it. Now the file will not open in the builder. I get a

 

Error reading cartridge.

System.ApplicationException: Exception type of type "System. Application Exception" was thrown.

at Groundspeak.Wherigo.ZonesEngine.ZonesEngineDll.LuaDoFile(String filename)

at ZonesAuthor.LuaFunctions.ReadLuaCartridge(String luaFileName)

at ZonesAuthor.frmMain.OpenCartridgeFile()

 

I have the file saved before I made the changes.

Any help would be appreciated.

Edited by Zorkan_Heneron
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...