Jump to content
  • 0

Help custom command


Aksl

Question


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  35
  • Reputation:   2
  • Joined:  05/23/12
  • Last Seen:  

Hi, i have a simple debug in the console when i'm using this command :

 

 

BUILDIN_FUNC(inv2stor)

{
       TBL_PC * sd = ((script_hasdata(st,11)) ? map_id2sd(script_getnum(st,11)) : script_rid2sd(st));
        int i,ok;
       struct item_data* item_data;
        struct item tmp_it;
        int item_id = script_getnum(st,2);
        int item_nb = script_getnum(st,3);
        
        nullpo_ret(sd);
        
        if( (item_data = itemdb_exists(item_id)) != NULL ){
            tmp_it.nameid = item_data->nameid;
            tmp_it.identify = script_getnum(st,4);
            tmp_it.refine = script_getnum(st,5);
            tmp_it.attribute = script_getnum(st,6);            
            tmp_it.card[0] = script_getnum(st,7);
            tmp_it.card[1] = script_getnum(st,8);
            tmp_it.card[2] = script_getnum(st,9);
            tmp_it.card[3] = script_getnum(st,10);
            
            ARR_FIND( 0, MAX_INVENTORY, i, ((&sd->status.inventory != NULL)
                    && compare_item(&sd->status.inventory,&tmp_it,7) ));
            if( i < MAX_INVENTORY ){
                ok=storage_storageadd(sd,i,item_nb);
                script_pushint(st,ok);
                storage_storageclose(sd);
                return ok;
            }
        }
        script_pushint(st,-1);
        return 0;
}

 

Just a debug, no reason, nothing ..

 

Someone could help me please ?

 

Thanks 

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

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

×
×
  • Create New...