The Dink Network

Reply to New item problem.

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
November 4th 2014, 04:29 PM
goblinh.gif
mkbul
Peasant He/Him Greece
TPA~ 
Hello folks. I am working on some new items for an old project of mine. However i've run to a problem. Check this out:

void buysw2( void)
{
int &junk = free_items();

if (&junk < 1)
 {
         choice_start()
        set_y 240
        title_start();
You are carrying too much.
        title_end();
         "Ok"
         choice_end()
 return;
 }

if (&gold < 2000)
 {
         choice_start()
        set_y 240
        set_title_color 6
        title_start();
Not enough to buy!
        title_end();
         "Ok"
         choice_end()
 return;
 }
&gold -= 2000;
add_item("item-sw2",521, 25);
}


load_sequence graphics\newitems\item-w 521 NOTANIM


My problem is, the vendor simply takes the gold, but no sword is given. The sword code is a copy of the clawsword code with very little changes that do not mess up the script in any way.

What am i doing wrong, C gurus?