inventory error

Started by , Fri 23/07/2004 21:23:50

Previous topic - Next topic

Obadiah

I am very new to AGS(just got it yesterday) but I did read the tutorial and found nothing about this error. I made a simple room, added an object to pick up, scripted the object to disappear and give the player an inv. item when it is picked up, and that all works fine. But when I try to look at my inventory screen (using the default GUI template) I get this error:

An error has occurred. Please contact the game author for support, as this is likely to be a scripting error and not a bug in AGS.
(ACI version 2.61.747)
Error: InventoryScreen: one or more of the inventory screen graphics have been deleted.

Darth Mandarb

The object you place in the room isn't the 'inventory' image ... you need a sprite created for your inventory screens.

Make sure that you have 2 sprites for each object (1 for how it appears in the background and 1 for your inventory screen)
NOTE: You don't always need 2 ... but usually.  Because their sizes rarely match up

Sounds to me like you assigned the Inventory item a sprite, then deleted it.

In the editor, make sure you have an image (sprite) assigned to the item you're scripting for!

Obadiah

I do have a sprite assigned to the inventory item. Does it need to be a specific size or something? (It's 32x32)

Darth Mandarb

Look up SetInvDimensions in the help file ... you should make them all a standard size, but you don't have to.

1)
Check your script where you add the inventory item to your player's inventory.

Find the number of the inventory item that's being added (ex. 1).

Then, in AGS, check the inventory items section and make sure item #1 (if that's the number of the particular item) is assigned a sprite.

Unless option 2 (below) occured ... this is the only thing I can think of that would cause this error.

2)
When it says, "One or more of your inventory screen graphics has been deleted." that sounds like something might have gotten deleted somehow that the default inventory GUI needs ... have you tried starting an all new game and re-creating the script?

Might be worth a try ... if you somehow managed to delete something you shouldn't have.Ã,  (though I must admit I'm more leaning towards option 1 here)

Good luck!

SMF spam blocked by CleanTalk