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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

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