Jump to content
  • 0

Compile Error 17161


Rhaven

Question


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   1
  • Joined:  11/09/12
  • Last Seen:  

undeclared idenfier inf2 = line 12442 src/map/skill.c

Edited by Rhaven
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  52
  • Topics Per Day:  0.01
  • Content Count:  185
  • Reputation:   20
  • Joined:  01/06/13
  • Last Seen:  

error too

2i0yf0o.jpg

 

im curious, is part of the error OnPCLinEvent not work anymore or its something else?

Edited by Saisho
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  754
  • Reputation:   186
  • Joined:  05/22/12
  • Last Seen:  

I think using int instead of uint would work. But let us wait for a fix from the devs. Probably a cross platform compatibility issue. :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   1
  • Joined:  11/09/12
  • Last Seen:  

alright. waiting...

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

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