Jump to content
  • 0
Legato

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

Question

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,

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

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.

Link to comment
Share on other sites

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;
}


Link to comment
Share on other sites

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
Link to comment
Share on other sites

@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
Link to comment
Share on other sites

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

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

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.