Jump to content
  • 0
Lil Troll

C2223: left of '->equip' must point to struct/union (SOLVED)

Question

SOLVED! :)

Hi rathenians anyone knows how to fix this? Im using the latest SVN.

Help with costume system diff.

Im having errors. 

offline\svn\src\map\atcommand.c(1172): error C2223: left of '->equip' must point to struct/union
offline\svn\src\map\atcommand.c(1173): error C2223: left of '->equip' must point to struct/union
offline\svn\src\map\atcommand.c(1174): error C2223: left of '->equip' must point to struct/union
offline\svn\src\map\atcommand.c(1175): error C2223: left of '->equip' must point to struct/union
offline\svn\src\map\atcommand.c(1176): error C2223: left of '->equip' must point to struct/union
offline\svn\src\map\atcommand.c(1177): error C2223: left of '->equip' must point to struct/union
	if( !strcmpi(command+1,"costumeitem") )
	{
		if( !battle_config.reserved_costume_id )
		{
			clif_displaymessage(fd, "Costume convertion is disable. Set a value for reserved_cosutme_id on your battle.conf file.");
			return -1;
		}
		if( !(item_data->equip&EQP_HEAD_LOW) &&
			!(item_data->equip&EQP_HEAD_MID) &&
			!(item_data->equip&EQP_HEAD_TOP) &&
			!(item_data->equip&EQP_COSTUME_HEAD_LOW) &&
			!(item_data->equip&EQP_COSTUME_HEAD_MID) &&
			!(item_data->equip&EQP_COSTUME_HEAD_TOP) )
		{
			clif_displaymessage(fd, "You cannot costume this item. Costume only work for headgears.");
			return -1;
		}
		costume = 1;
	}


Bump solved it my self, this is the fix, actually idk what im doing but magically i fix the source without having problem, wild guess sure do work sometimes. :)

C2223: left of '->equip' must point to struct/union

I get this error from.

itemlist = strtok(item_name, ":");
	while (itemlist != NULL && j<10) {
		if ((item_data[j] = itemdb_searchname(itemlist)) == NULL &&
		    (item_data[j] = itemdb_exists(atoi(itemlist))) == NULL){
			clif_displaymessage(fd, msg_txt(sd,19)); // Invalid item ID or name.
			return -1;
		}
		itemlist = strtok(NULL, ":"); //next itemline
		j++;
         }

The old format of this is:

if ((item_data = itemdb_searchname(item_name)) == NULL &&
	    (item_data = itemdb_exists(atoi(item_name))) == NULL)
	{
		clif_displaymessage(fd, msg_txt(sd,19)); // Invalid item ID or name.
		return -1;
	}

Manage to fix the Error by changing these:

if( !(item_data->equip&EQP_HEAD_LOW) &&
!(item_data->equip&EQP_HEAD_MID) &&
!(item_data->equip&EQP_HEAD_TOP) &&
!(item_data->equip&EQP_COSTUME_HEAD_LOW) &&
!(item_data->equip&EQP_COSTUME_HEAD_MID) &&
!(item_data->equip&EQP_COSTUME_HEAD_TOP) ) 

to these:

if( !(item_data[j]->equip&EQP_HEAD_LOW) &&
!(item_data[j]->equip&EQP_HEAD_MID) &&
!(item_data[j]->equip&EQP_HEAD_TOP) &&
!(item_data[j]->equip&EQP_COSTUME_HEAD_LOW) &&
!(item_data[j]->equip&EQP_COSTUME_HEAD_MID) &&
!(item_data[j]->equip&EQP_COSTUME_HEAD_TOP) )

Now if someone want to use costume system in the latest svn like am using([r17516]). This is the fix.. :)

Edited by Lil Troll
  • Upvote 2
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

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

Important Information

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