add_item
I have a problem concerning the add_item thingy.. Take a look at this extract from one of my scripts
--------------------------------------
if (&result == 2)
{
&drank = 0;
add_item("item-koffie",438,27);
unfreeze(1);
sp_hard(¤t_sprite, 1);
draw_hard_sprite(¤t_sprite);
sp_active(¤t_sprite, 0);
return;
}
--------------------------------------
1/ I don't really know where I should put the unfreeze(1); , but then again that's not really a problem, just something I'd like to know
2/ I used this with other items, and it worked fine, but when I try to get the 'coffee' in the inventory, it just doesn't turn up! I've tried to solve it, but I just can't find the problem..
thanks
--------------------------------------
if (&result == 2)
{
&drank = 0;
add_item("item-koffie",438,27);
unfreeze(1);
sp_hard(¤t_sprite, 1);
draw_hard_sprite(¤t_sprite);
sp_active(¤t_sprite, 0);
return;
}
--------------------------------------
1/ I don't really know where I should put the unfreeze(1); , but then again that's not really a problem, just something I'd like to know
2/ I used this with other items, and it worked fine, but when I try to get the 'coffee' in the inventory, it just doesn't turn up! I've tried to solve it, but I just can't find the problem..
thanks
Have you modified the 438 sequence? By default, there are only 23 frames within it, and it looks like you're trying to use the 27th frame as the icon.
Yes, as I matter of fact I have (forgot to mention it) I added a couple of frames.
Maybe I should try whether it works with a different frame.
EDIT: nope, doesn't work...
Maybe I should try whether it works with a different frame.
EDIT: nope, doesn't work...

If you've added the new frame 27, you must also add (in your D-Mod's graphics dir) the other frames 1 to 26.
Only other thing I can think of is the filename being too long, but I doubt it is that.
Only other thing I can think of is the filename being too long, but I doubt it is that.
I have added the other frames, so that can't be the problem...
Which filename do you mean?
Which filename do you mean?
"item-koffie"
Rename to "item-kof" or something with 8 characters. Both the file and in the script.
Rename to "item-kof" or something with 8 characters. Both the file and in the script.