Jump to content
  • 0

Question

hi,

i have one diff to use @restock but when i compile i got some errors

 

diff:

void pc_restock_getstorage(struct map_session_data *sd, int itemid, int amount)
{
	int i;
	for( i = 0; i < MAX_STORAGE; i++ )
	{
		if (sd->status.storage.items[i].nameid == itemid)
		{
			if(sd->status.storage.items[i].amount < amount )
				amount = sd->status.storage.items[i].amount;
			
			storage->get(sd, i, amount);
		}
	}
}

the error when compile:

        CC      pc.c
pc.c: In function 'pc_restock_getstorage':
pc.c:12473: error: 'struct mmo_charstatus' has no member named 'storage'
pc.c:12475: error: 'struct mmo_charstatus' has no member named 'storage'
pc.c:12476: error: 'struct mmo_charstatus' has no member named 'storage'
make[1]: *** [obj_sql/pc.o] Error 1

pls help me.

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
11 hours ago, brunosc said:

hi,

i have one diff to use @restock but when i compile i got some errors

 

diff:

void pc_restock_getstorage(struct map_session_data *sd, int itemid, int amount) { int i; for( i = 0; i < MAX_STORAGE; i++ ) { if (sd->status.storage.items.nameid == itemid) { if(sd->status.storage.items.amount < amount ) amount = sd->status.storage.items.amount; storage->get(sd, i, amount); } } }


void pc_restock_getstorage(struct map_session_data *sd, int itemid, int amount)
{
	int i;
	for( i = 0; i < MAX_STORAGE; i++ )
	{
		if (sd->status.storage.items[i].nameid == itemid)
		{
			if(sd->status.storage.items[i].amount < amount )
				amount = sd->status.storage.items[i].amount;
			
			storage->get(sd, i, amount);
		}
	}
}

the error when compile:

CC pc.c pc.c: In function 'pc_restock_getstorage': pc.c:12473: error: 'struct mmo_charstatus' has no member named 'storage' pc.c:12475: error: 'struct mmo_charstatus' has no member named 'storage' pc.c:12476: error: 'struct mmo_charstatus' has no member named 'storage' make[1]: *** [obj_sql/pc.o] Error 1


        CC      pc.c
pc.c: In function 'pc_restock_getstorage':
pc.c:12473: error: 'struct mmo_charstatus' has no member named 'storage'
pc.c:12475: error: 'struct mmo_charstatus' has no member named 'storage'
pc.c:12476: error: 'struct mmo_charstatus' has no member named 'storage'
make[1]: *** [obj_sql/pc.o] Error 1

pls help me.

Whole please.

Share this post


Link to post
Share on other sites

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

×
×
  • Create New...

Important Information

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