Jump to content
  • 0
Sign in to follow this  
nasagnilac

@flooritem request

Question

I need help for @flooritem command. I need some who can fixe my errors.

/*========================================== * Creación de items en el suelo, en un Area. *------------------------------------------*/ACMD(flooritem){	char item_name[100];	int number = 0, count;	struct item_data *item_data;	nullpo_retr(-1, sd);	memset(item_name, '0', sizeof(item_name));	if( !message || !*message || (		sscanf(message, ""%99[^"]" %d", item_name, &number) < 1 &&		sscanf(message, "%99s %d", item_name, &number) < 1	)) {		clif->message(sd->fd, "Usage: @flooritem <itemname/itemid> [quantity]");		return -1;	}	if( number <= 0 )		number = 1;	if ((item_data = itemdb->search_name(item_name)) == NULL &&	    (item_data = itemdb->exists(atoi(item_name))) == NULL)	{		clif->message(sd->fd, msg_txt(19)); // Invalid item ID or name.		return -1;	}	count = map->addflooritem(&sd->bl, 0, 0, 0, item_data->nameid, number);	if( count != 0 )		if( number == count )			clif->message(sd->fd, "All items created.");		else		{			sprintf(atcmd_output, "%d item(s) created.", count);			clif->message(sd->fd, atcmd_output);		}	else {		clif->message(sd->fd, "No items created!!.");		return -1;	}	return 0;}

I just highlights the line error 1783 into red. I hope someone can fix this.

1>c:usersnasagnilacdesktopmaintenancesrcmapatcommand.c(1783): warning C4133: 'function' : incompatible types - from 'block_list *' to 'item *'1>c:usersnasagnilacdesktopmaintenancesrcmapatcommand.c(1783): error C2198: 'function through pointer' : too few arguments for call 

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.