Pawn compiler jokes me.
#1

pawn Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart)
{
    return 1
}
Код:
(1311) : error 025: function heading differs from prototype
why?!
Reply
#2

I have read on a_samp include and this callback is included with all parameters so i don't know why the compiler return me this error.
Reply
#3

Have you updated your SA-MP server package? (by which I mean the includes?) It looks like the compiler is using an outdated include, in which the syntax of OnPlayerTakeDamage was different.

EDIT: Are you sure that the compiler is using the a_samp.inc that you just checked?
Reply
#4

It's
pawn Код:
return 1;
Reply
#5

Quote:
Originally Posted by Jstylezzz
Посмотреть сообщение
Have you updated your SA-MP server package? (by which I mean the includes?) It looks like the compiler is using an outdated include, in which the syntax of OnPlayerTakeDamage was different.

EDIT: Are you sure that the compiler is using the a_samp.inc that you just checked?
the server is the last, and i have all the includes in, and in a_samp.inc have the callback that i want use..
Reply
#6

Quote:
Originally Posted by Bingo
Посмотреть сообщение
It's
pawn Код:
return 1;
it isn't.
Reply
#7

Lol, yes it is. Bingo is right, it's
pawn Код:
return 1;
.
Reply
#8

Quote:
Originally Posted by Jstylezzz
Посмотреть сообщение
Lol, yes it is. Bingo is right, it's
pawn Код:
return 1;
.
it isn't i tryed and compilter return the same error ._.
Reply
#9

Yeah, but even if it returns the same error, it is return 1;
Take a look at the wiki
Now, I'm not sure what's causing your problem, as the function works perfectly fine for me. Just for the sake of trying, could it be that line 1311 is not the line you copy pasted?

To be sure, I downloaded a fresh sa-mp server package and added the code from the first post into a blank script (adding a ';' after return), and it compiles fine.
Reply
#10

i have check it in another file .pwn, and compiler compile it perfectly, in my gm file not.. why ?! :O
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)