Stupid Warning!
#1

Im getting a mismatch warning on this.

pawn Код:
new Float:pay;
    pay = Distance(Startx,Starty,Starty,Endx,Endy,Endz);
The stock is this.
pawn Код:
stock Float:Distance(Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2)
{
    new Float:result = floatsqroot(floatpower(floatsub(x2,x1),2)+floatpower(floatsub(y2,y1),2)+floatpower(floatsub(z2,z1),2));
    return result;
}
Reply
#2

How are Startx,Starty,Starty,Endx,Endy,Endz defined?
pawn Код:
new Float:pay;
    pay = Distance(Startx,Starty,Starty,Endx,Endy,Endz);
And most importantly, on which line do you get the warning?
Reply
#3

They are defined locally in a stock.

That stock is
pawn Код:
stock CreatePlayerMission(playerid, bool:TrailerCheck, MissionPay2, Float:Startx, Float:Starty, Float:Startz, Float:Endx, Float:Endy, Float:Endz)
And The error is
Код:
C:\Users\Nickolas\Desktop\PWn\Server\gamemodes\bus.pwn(4809) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
And the code is:
pawn Код:
new Float:pay;
    pay = Distance(Startx,Starty,Starty,Endx,Endy,Endz);
    minfo[playerid][Pay] = pay;//4809
Yeah i just noticed it was erroring on a diff line then i originally thought, but still i dnno whats wrong.

BTW what im trying to do with this system is base pay off how long the mission is, just so you know what im trying to acheive.
Reply
#4

You defined Pay as a Float.

Easy fix:
pawn Код:
minfo[playerid][Pay] = floatround(pay);
Reply
#5

Yay mick saved the day!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)