SA-MP Forums Archive
Help me please 4 errors - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help me please 4 errors (/showthread.php?tid=474979)



Help me please 4 errors - thomaswilliams - 10.11.2013

These are the lines:

PHP код:
if(arr_Engine{iVehicle} == 1) {
                new 
String[128];
                
format(string,sizeof(string),"~b~Speed:~n~%.0f MPH"player_get_speed(i));
                
VHS[i] = TextDrawCreate(545.000000,387.000000,String);
                
TextDrawAlignment(VHS[i],0);
                
TextDrawBackgroundColor(VHS[i],0x000000ff);
                
TextDrawFont(VHS[i],1);
                
TextDrawLetterSize(VHS[i],0.299999,1.000000);
                
TextDrawColor(VHS[i],0xffffffff);
                
TextDrawSetOutline(VHS[i],1);
                
TextDrawSetProportional(VHS[i],1);
                
TextDrawSetShadow(VHS[i],1);
                
TextDrawShowForPlayer(iVHS[i]);
            } 
Errors:

PHP код:
C:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(110928) : error 017undefined symbol "player_get_speed"
C:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(110970) : error 017undefined symbol "playerid"
C:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(110979) : error 010invalid function or declaration
C
:\Users\Thomas Williams\Desktop\Our Server\gamemodes\GTA.pwn(110999) : error 017undefined symbol "playerid"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhaseaborted.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase 
Please help


Re: Help me please 4 errors - NeMoK - 10.11.2013

pawn Код:
if(arr_Engine{iVehicle} == 1) {
new String[128];
new vehicleid=GetPlayerVehicleID(i);
new Float:x,Float:y,Float:z;
GetVehicleVelocity(vehicleid,x,y,z);
new velocity=floatround(floatsqroot(((x*x)+(y*y)))*100);
                format(string,sizeof(string),"~b~Speed:~n~%d MPH",velocity);
                VHS[i] = TextDrawCreate(545.000000,387.000000,String);
                TextDrawAlignment(VHS[i],0);
                TextDrawBackgroundColor(VHS[i],0x000000ff);
                TextDrawFont(VHS[i],1);
                TextDrawLetterSize(VHS[i],0.299999,1.000000);
                TextDrawColor(VHS[i],0xffffffff);
                TextDrawSetOutline(VHS[i],1);
                TextDrawSetProportional(VHS[i],1);
                TextDrawSetShadow(VHS[i],1);
                TextDrawShowForPlayer(i, VHS[i]);
            }



Re: Help me please 4 errors - Camacorn - 10.11.2013

For the first error, it appears that you do not have a 'player_get_speed()' function. As for the following errors, you did not paste the code for, thus I can't provide assistance.