Jump to content
  • 0

C to C++ command


SyncMaster

Question


  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   37
  • Joined:  07/15/13
  • Last Seen:  

When Rathena was a C emulator I had this command to change char variables. But now I have some problems to fix it in the C+.

Old .c and now .cpp

 
Quote

    if(sd){
        pc_setglobalreg(sd, add_str("p1"), x);
        pc_setglobalreg(sd, add_str("p2"), y);
        dir = (sd->bl.x == x && sd->bl.y == y) ? 6 : map_calc_dir(&sd->bl,x,y);
        pc_setglobalreg(sd, add_str("dirJogador"), dir);
        return true;
    }
    break;

Compile Error

http://prntscr.com/kuwxv0

 

 

Edited by SyncMaster
  • Love 1
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

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

those x y dir clearly not defined. the problem not the c or c++, but where you add the codes?

Edited by Cydh
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   37
  • Joined:  07/15/13
  • Last Seen:  

11 hours ago, Cydh said:

those x y dir clearly not defined. the problem not the c or c++, but where you add the codes?

skill.c when I define them, they change to another error. On free time I'll change and print it here

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  123
  • Reputation:   37
  • Joined:  07/15/13
  • Last Seen:  

Now i'm ashamed, the error was due to the skill placed in the wrong area for that type of skill..... solved.

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