Jump to content
  • 0

pc.c(5945): warning C4013: 'pow' undefined; assuming extern returning int


Question

Posted

Hey, everyone. Title says it all. Can somebody tell me why I am getting that warning?

I found BUILDIN_FUNC(pow) on script.c and couldn't find any more. Or perhaps, I wasn't search hard enough.

Can someone explain me, what does it mean, the warning. Thank you. Any help would be greatly appreciated.

Happy Holidays!

Regards,

7 answers to this question

Recommended Posts

Posted

I think that function pow is not declared and it being used in other functions so thats why it is reporting a warning. I guess that 5945 is the line number in pc.c where it is being used.

Posted

I think its not Im not getting this error also. And I found also that function in script.c. I also noticed its a Math function. maybe just try adding them.

find

BUILDIN_FUNC(sqrt)

add below the function heres the code

BUILDIN_FUNC(pow)
{
double i, a, b;
a = script_getnum(st,2);
b = script_getnum(st,3);
i = pow(a,;
script_pushint(st,(int)i);
return 0;
}


Posted (edited)

just put #include <math.h> and that should fix it. It should compile with -lm option by default anyway.

Oops this anwser is based on your title error message, if you wan't the script function then yes add JayPeeMateo snipet.

Edited by Lighta
Posted (edited)

@Lighta

thats not my snippet I just copied it from rAthenas SVN coz he said

I found BUILDIN_FUNC(pow) on script.c and couldn't find any more. Or perhaps, I wasn't search hard enough.

Edited by JayPeeMateo
Posted

@BrianL

No, sir. It's not from rAthena's svn. I found a .patch file when I was browsing the eAthena's forum. It's a custom, yes.

But, I am using rAthena's svn.

@JayPeeMateo

I have that on script.c.

@Lighta

Sure. Thanks, would try that.

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