2020-11-12, 12:15 PM
(This post was last modified: 2020-11-12, 02:20 PM by Ryder Sixz.)
(2020-11-12, 07:10 AM)Kwarde Wrote: I can't magically look into your computer and see what the exact code is. Anyway,
"error 025: function heading differs from prototype"
This means that a public function's arguments doesn't match it's arguments when it was forwarded. Eg.
Code:forward myPublicFunction(Foo);
public myPublicFunction(Foo, Bar)
{
? ? return;
}
That would throw that error, for example.
"error 021: symbol already defined: "JBC_GetPlayerSpeed""
JBC_GetPlayerSpeed is already defined.
Sorry for not putting the code part, here it is.
Code:
Tryg3D::Function:: Float:GetPlayerSpeed(playerid){
new Float:x,Float:y,Float:z;
GetPlayerVelocity(playerid,x,y,z);
return floatmul(VectorSize(x,y,z),PLAYER_SPEED_MULTIPLIER);
}
So what would be the possible solution?
The problem is not really the code, it is that the include JunkBuster and the include 3DTryg cannot be in the same code because it throws the aforementioned errors. If you put them separately each one works well.
Edited: I already solved the problem by deleting the part of the 3DTryg include where it gave me an error, I think it was because that part was already defined in the JunkBuster include. Cheers