• 0
SyncMaster

C to C++ command

Question

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

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

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

Edited by Cydh

Share this post


Link to post
Share on other sites
  • 0
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now