SA-MP Forums Archive
EVF.inc bug - 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: EVF.inc bug (/showthread.php?tid=638910)



EVF.inc bug - crukk11 - 08.08.2017

Quote:

C:\Users\cyber\Desktop\lel.pwn(1206) : warning 202: number of arguments does not match definition
C:\Users\cyber\Desktop\lel.pwn(1206) : warning 215: expression has no effect
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Header size: 10396 bytes
Code size: 546432 bytes
Data size: 6219208 bytes
Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 6792420 bytes

2 Warnings.

PHP код:
public OnPlayerEnterVehicle(PIDvehicleidispassenger)
{
            new 
name[35];
            
GetVehicleName(vehicleidname); //error line
            
new string[45];
            
format(stringsizeof string"~y~%s"name);
            
GameTextForPlayer(PIDstring50001);
            return 
1;




Re: EVF.inc bug - Ghazal - 08.08.2017

According to the include, this is how you should use the GetVehicleName:
pawn Код:
GetVehicleName(vehicleid);
Use this code instead.
pawn Код:
public OnPlayerEnterVehicle(PID, vehicleid, ispassenger)
{
            new string[45];
            format(string, sizeof string, "~y~%s", GetVehicleName(vehicleid));
            GameTextForPlayer(PID, string, 5000, 1);
            return 1;
}