SA-MP Forums Archive
undefined symbol playerid - 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: undefined symbol playerid (/showthread.php?tid=280977)



undefined symbol playerid - [EDT]AmanSingh123 - 03.09.2011

the code

pawn Код:
public object1()
{
    new vehicleid = GetPlayerVehicleID(playerid);   //this is line 717
    {
       PutPlayerInVehicle(playerid, vehicleid, 0);     // and this line 719
    }
    return 1;
}
error
pawn Код:
C:\Users\Aman\Desktop\GTA\its a server\windows\gamemodes\elitedrift.pwn(717) : error 017: undefined symbol "playerid"
C:\Users\Aman\Desktop\GTA\its a server\windows\gamemodes\elitedrift.pwn(719) : error 017: undefined symbol "playerid"



Re: undefined symbol playerid - Jafet_Macario - 03.09.2011

PHP код:
forward object1(playerid); 
PHP код:
public object1(playerid)
{
    new 
vehicleid GetPlayerVehicleID(playerid);  
    {
       
PutPlayerInVehicle(playeridvehicleid0);  
    }
    return 
1;




Re: undefined symbol playerid - SchurmanCQC - 03.09.2011

pawn Код:
public object1(playerid)
{
    new vehicleid = GetPlayerVehicleID(playerid);   //this is line 717
    {
       PutPlayerInVehicle(playerid, vehicleid, 0);     // and this line 719
    }
    return 1;
}



Re: undefined symbol playerid - [EDT]AmanSingh123 - 03.09.2011

Quote:
Originally Posted by Jafet_Macario
Посмотреть сообщение
PHP код:
forward object1(playerid); 
PHP код:
public object1(playerid)
{
    new 
vehicleid GetPlayerVehicleID(playerid);  
    {
       
PutPlayerInVehicle(playeridvehicleid0);  
    }
    return 
1;


errors
pawn Код:
C:\Users\Aman\Desktop\GTA\its a server\windows\gamemodes\elitedrift.pwn(182) : error 025: function heading differs from prototype
C:\Users\Aman\Desktop\GTA\its a server\windows\gamemodes\elitedrift.pwn(717) : error 025: function heading differs from prototype

code
pawn Код:
forward object1(playerid);  //line 182

public object1(playerid)   //line 717



Re: undefined symbol playerid - Jafet_Macario - 03.09.2011

Delete:
PHP код:
forward object1(); 



Re: undefined symbol playerid - [EDT]AmanSingh123 - 03.09.2011

did that, and the same error on line 717.... the differ one


Re: undefined symbol playerid - Jafet_Macario - 03.09.2011

Check out for another object1 forwarded and delete it, it compiles fine to me.