Jump to content
  • 0

error in compiling... help!


Haikenz

Question


  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  309
  • Reputation:   82
  • Joined:  11/15/11
  • Last Seen:  

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

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 1

  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  86
  • Reputation:   21
  • Joined:  10/02/13
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  309
  • Reputation:   82
  • Joined:  11/15/11
  • Last Seen:  

Solved, thank you <3

Link to comment
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.   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...