SA-MP Forums Archive
problem with GetPlayerVirtualWorld - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: problem with GetPlayerVirtualWorld (/showthread.php?tid=162921)



problem with GetPlayerVirtualWorld - Nightrule - 25.07.2010

Hello
I get an warning with the following:
pawn Код:
else if (strcmp("/park", cmd, true, 10) == 0)
{
    if (IsPlayerInVehicle(playerid,Carlist[playerid][Carid]))
    {
            GetVehiclePos(Carlist[playerid][Carid],Carlist[playerid][X],Carlist[playerid][Y],Carlist[playerid][Z]);
            GetVehicleZAngle(Carlist[playerid][Carid],Carlist[playerid][Rotation]);
            SetPlayerInterior(playerid,Carlist[playerid][Interior]);
            GetPlayerVirtualWorld(playerid,Carlist[playerid][Virtual]);//here is the warning!
            GameTextForPlayer(playerid, "~w~Fahrzeug ~g~geparkt", 5000, 6);
    }
    else { SendClientMessage(playerid, COLOR_GREY, "Du sitzt nicht in deinem eigenen Auto!"); }
    return 1;
}
The warning is:
pawn Код:
C:\Users\GTASA\Desktop\Server\carsystem.pwn(705) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Warning.
can someone tell me why?

thank you


Re: problem with GetPlayerVirtualWorld - straco - 25.07.2010

Try this

Carlist[playerid][Virtual]=GetPlayerVirtualWorld(playerid);


Re: problem with GetPlayerVirtualWorld - Last_Stand_Guardian - 25.07.2010

Wrong Syntax:
It's GetPlayerVirtualWorld(playerid); with 1 argument, which returns the virtual world of the playerid =D

straco's solution is the right on‌e =D