The Dink Network

add_item

December 29th 2005, 09:06 AM
duck.gif
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(&current_sprite, 1);
draw_hard_sprite(&current_sprite);
sp_active(&current_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
December 29th 2005, 10:12 AM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
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.
December 29th 2005, 10:58 AM
duck.gif
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...
December 29th 2005, 11:13 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
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.
December 29th 2005, 11:18 AM
duck.gif
I have added the other frames, so that can't be the problem...
Which filename do you mean?
December 29th 2005, 11:33 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
"item-koffie"

Rename to "item-kof" or something with 8 characters. Both the file and in the script.
December 29th 2005, 11:36 AM
duck.gif
YES, it worked!
thank you!