Jump to content
  • 0

error in compiling... help!


Question

Posted

Anyone who understands about source could give me a help, I'm with a mod here, but it is with an error in that part when compiling, could you tell me the solution

5>c:\users\renato\downloads\ragnarok\rathena\src\map\atcommand_ranked_func.inc(218): error C2664: 'void ranked_update_rank(map_session_data *,float,ranked_update,ranked_msg_points)': cannot convert argument 3 from 'int' to 'ranked_update'
5>  c:\users\renato\downloads\ragnarok\rathena\src\map\atcommand_ranked_func.inc(218): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
5>c:\users\renato\downloads\ragnarok\rathena\src\map\atcommand_ranked_func.inc(244): error C2664: 'void ranked_update_rank(map_session_data *,float,ranked_update,ranked_msg_points)': cannot convert argument 3 from 'int' to 'ranked_update'
5>  c:\users\renato\downloads\ragnarok\rathena\src\map\atcommand_ranked_func.inc(244): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)

 

atcommand_ranked_func.inc

2 answers to this question

Recommended Posts

  • 1
Posted (edited)

Try to explicitly cast the third arguments to the ranked_update enumeration in both calls to ranked_update_rank, as such:

On line 218:

ranked_update_rank(sd,0,static_cast<ranked_update>(type-1),RANK_P_OTHERS);

On line 244:

ranked_update_rank(sd,points,static_cast<ranked_update>(type),RANK_P_OTHERS);

And recompile. You might face other issues with this code, since it was probably written for VC++ 6.0, which is a legacy version of a C++ compiler.

Edited by Tyrfing
  • Upvote 1

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...