Jump to content
  • 0

Compile Error 17161


Question

4 answers to this question

Recommended Posts

Posted (edited)

uhm, beside it, there are some uncompatible values, need to be casted to the correct value.

[s]Index: src/map/skill.c
===================================================================
--- src/map/skill.c    (revision 17161)
+++ src/map/skill.c    (working copy)
@@ -12439,7 +12439,7 @@
     struct status_change *sc;
     struct skill_condition require;
     int i;
-    uint inf2;
+    uint16 inf2;
 
     nullpo_ret(sd);
 
@@ -12563,13 +12563,13 @@
     // perform skill-group checks
     inf2 = skill_get_inf2(skill_id);
     if(inf2&INF2_CHORUS_SKILL) {
-        if ( skill_check_pc_partner(sd,skill_id,&skill_lv,skill_get_splash(skill_id,skill_lv),0) < 1 ){
+        if ( skill_check_pc_partner(sd,skill_id,(short*)&skill_lv,skill_get_splash(skill_id,skill_lv),0) < 1 ){
             clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
             return 0;
         }
     }
     else if(inf2&INF2_ENSEMBLE_SKILL){
-        if (skill_check_pc_partner(sd, skill_id, &skill_lv, 1, 0) < 1) {
+        if (skill_check_pc_partner(sd, skill_id, (short*)&skill_lv, 1, 0) < 1) {
             clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
             return 0;
         }
@@ -12718,7 +12718,7 @@
             break;
 
         case PR_BENEDICTIO:
-            if (skill_check_pc_partner(sd, skill_id, &skill_lv, 1, 0) < 2)
+            if (skill_check_pc_partner(sd, skill_id, (short*)&skill_lv, 1, 0) < 2)
             {
                 clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
                 return 0;
@@ -12901,7 +12901,7 @@
          * Warlock
          **/
         case WL_COMET:
-            if( skill_check_pc_partner(sd,skill_id,&skill_lv,1,0) <= 0 && ((i = pc_search_inventory(sd,require.itemid[0])) < 0 || sd->status.inventory[i].amount < require.amount[0]) )
+            if( skill_check_pc_partner(sd,skill_id,(short*)&skill_lv,1,0) <= 0 && ((i = pc_search_inventory(sd,require.itemid[0])) < 0 || sd->status.inventory[i].amount < require.amount[0]) )
             {
                 //clif_skill_fail(sd,skill_id,USESKILL_FAIL_NEED_ITEM,require.amount[0],require.itemid[0]);
                 clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
@@ -12993,7 +12993,7 @@
             if( !(sc && sc->data[SC_BANDING]) ) {
                 clif_skill_fail(sd,skill_id,USESKILL_FAIL,0);
                 return 0;
-            } else if( skill_check_pc_partner(sd,skill_id,&skill_lv,skill_get_range(skill_id,skill_lv),0) < 1 )
+            } else if( skill_check_pc_partner(sd,skill_id,(short*)&skill_lv,skill_get_range(skill_id,skill_lv),0) < 1 )
                 return 0; // Just fails, no msg here.
             break;
         case LG_HESPERUSLIT:
@@ -13026,7 +13026,7 @@
             if( sd->spiritball > 0 )
                 sd->spiritball_old = require.spiritball = sd->spiritball;
             else {
-                clif_skill_fail(sd,skill_id,0,0);
+                clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
                 return 0;
             }
             break;
@@ -13043,7 +13043,7 @@
             break;
         case WM_GREAT_ECHO: {
                 int count;
-                count = skill_check_pc_partner(sd, skill_id, &skill_lv, skill_get_splash(skill_id,skill_lv), 0);
+                count = skill_check_pc_partner(sd, skill_id, (short*)&skill_lv, skill_get_splash(skill_id,skill_lv), 0);
                 if( count < 1 ) {
                     clif_skill_fail(sd,skill_id,USESKILL_FAIL_NEED_HELPER,0);
                     return 0;
@@ -13055,7 +13055,7 @@
         case SO_ELECTRICWALK:    // Can't be casted until you've walked all cells.
             if( sc && sc->data[SC_PROPERTYWALK] &&
                sc->data[SC_PROPERTYWALK]->val3 < skill_get_maxcount(sc->data[SC_PROPERTYWALK]->val1,sc->data[SC_PROPERTYWALK]->val2) ) {
-                clif_skill_fail(sd,skill_id,0x0,0);
+                   clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
                 return 0;
             }
             break;
 
[/s]

 
why I use "USESKILL_FAIL_LEVEL"? refer to clif.h, 0 is = USESKILL_FAIL_LEVEL
 

[s]enum useskill_fail_cause
{// clif_skill_fail
    USESKILL_FAIL_LEVEL = 0,
    USESKILL_FAIL_SP_INSUFFICIENT = 1,[/s]

 
@clyd, not a cross platform, it because unit isn't typedata on cbasetypes.h
 

[s]...
typedef uint8_t        uint8;
typedef uint16_t    uint16;
typedef uint32_t    uint32;
typedef uint64_t    uint64;
....[/s]

fixed on 17162. LOL

Edited by Cydh

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