error 017: undefined symbol "GetPlayerSpeed"
#1

Im having a prob with error 017: undefined symbol "GetPlayerSpeed" when i try to compile my script

C:\Users\Reese\Downloads\Ravens_Roleplay_0.3d_R2\R aven's Roleplay 0.3d R2 V4.2\gamemodes\larp.pwn(383 : error 017: undefined symbol "GetPlayerSpeed"
C:\Users\Reese\Downloads\Ravens_Roleplay_0.3d_R2\R aven's Roleplay 0.3d R2 V4.2\gamemodes\larp.pwn(18001) : error 017: undefined symbol "GetPlayerSpeed"
C:\Users\Reese\Downloads\Ravens_Roleplay_0.3d_R2\R aven's Roleplay 0.3d R2 V4.2\gamemodes\larp.pwn(28052) : warning 219: local variable "idcar" shadows a variable at a preceding level
C:\Users\Reese\Downloads\Ravens_Roleplay_0.3d_R2\R aven's Roleplay 0.3d R2 V4.2\gamemodes\larp.pwn(37682) : error 017: undefined symbol "GetPlayerSpeed"
C:\Users\Reese\Downloads\Ravens_Roleplay_0.3d_R2\R aven's Roleplay 0.3d R2 V4.2\gamemodes\larp.pwn(83631) : warning 235: public function lacks forward declaration (symbol "IsPlayerAdminCall")
C:\Users\Reese\Downloads\Ravens_Roleplay_0.3d_R2\R aven's Roleplay 0.3d R2 V4.2\gamemodes\larp.pwn(83633) : warning 206: redundant test: constant expression is non-zero
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


3 Errors.

Thanks for looking. and please help
Reply
#2

It'd be easier for us to help you if you display the lines of the errors.
Reply
#3

You should use GetPlayerVelocity instead or just make the GetPlayerSpeed function manually because it's not a native function. For the other warnings/errors, post code.
Reply
#4

I will put my gamemode on pastebin
Reply
#5

I cant put on pastebin, its too large. would someone be intrested in helping me through teamviewer, I may give something in return
Reply
#6

You needn't give the whole gamemode, but just the lines that the errors come from.
Reply
#7

3838 : new kmh = GetPlayerSpeed(targetid, true);
18001 : {
new kmh = GetPlayerSpeed(i, true);
if ((BusrouteEast[i][0] >= 0 && BusrouteWest[i][0] >= 0))
{
37682: {
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
new speed = GetPlayerSpeed(giveplayerid, true);
if(ViewingSpeed[playerid] == 0)
{
Reply
#8

Help please.
Reply
#9

For the "IsPlayerAdminCall" Change to "IsPlayerAdmin", change
pawn Код:
new kmh = GetPlayerSpeed(i, true);
to
pawn Код:
new Speed[4], kmh = GetPlayerVelocity(i, Speed[1], Speed[2], Speed[3]);
Reply
#10

Well as I told you before you HAVE to define GetPlayerSpeed manually because it's not a native function. In case of you couldn't do that, here's a defination I found on the net:

pawn Код:
stock GetPlayerSpeed(playerid)
{
    new Float:ST[4];
    if(IsPlayerInAnyVehicle(playerid))
    GetVehicleVelocity(GetPlayerVehicleID(playerid),ST[0],ST[1],ST[2]);
    else GetPlayerVelocity(playerid,ST[0],ST[1],ST[2]);
    ST[3] = floatsqroot(floatpower(floatabs(ST[0]), 2.0) + floatpower(floatabs(ST[1]), 2.0) + floatpower(floatabs(ST[2]), 2.0)) * 179.28625;
    return floatround(ST[3]);
}
and the usage of it obviously is GetPlayerSpeed(playerid) not GetPlayerSpeed(playerid, bool); so modify your code.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)