Kako da resim warning 202: number of arguments does not match definition

Započeo Markovicc, Decembar 24, 2019, 12:20:48 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

PRAVIM ULAZ I IZLAZ
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
   if(newkeys & KEY_SECONDARY_ATTACK)
   {
       if(IsPlayerInRangeOfPoint(playerid, 2.0 ,1298.8484,-798.4863,84.1406,345.5254))
      {
         SetPlayerInterior(playerid,3);
         SetPlayerPos(playerid,942.171997,-16.542755,1000.929687);
         SetCameraBehindPlayer(playerid);
         SendClientMessage(playerid,-1,"Usao si u bazu Yakuze");
      }
      else if(IsPlayerInRangeOfPoint(playerid, 2.0 ,942.171997,-16.542755,1000.929687))
      {
          SetPlayerInterior(playerid,0);
          SetPlayerPos(playerid,1298.8484,-798.4863,84.1406,345.5254);
          SetCameraBehindPlayer(playerid);
          SendClientMessage(playerid,-1,"Izasao si iz Yakuzine privatne sobe");
      }
      if(IsPlayerInRangeOfPoint(playerid, 2.0 ,1258.8302,-785.4825,92.0302))
      {
         SetPlayerInterior(playerid,2);
         SetPlayerPos(playerid,1523.509887,-47.821197,1002.130981);
         SetCameraBehindPlayer(playerid);
         SendClientMessage(playerid,-1,"Usao si u bazu Yakuzinu privatnu sobu");
      }
      else if(IsPlayerInRangeOfPoint(playerid, 2.0 ,1523.509887,-47.821197,1002.130981))
      {
          SetPlayerInterior(playerid,0);
          SetPlayerPos(playerid,1258.8302,-785.4825,92.0302);
          SetCameraBehindPlayer(playerid);
          SendClientMessage(playerid,-1,"Izasao si iz Yakuzine privatne sobe");
      }
   }
         
   return 1;
}
Vecinu vaznih stvaru u svetu postigli u ljudi koji nisu odustajali kada se cinilo da uposte nema nade.


[pawn]
1298.8484,-798.4863,84.1406,345.5254
[/pawn]
u IsPlayerInRangeOfPoint ide x, y, z
a ne x, y, z, angle,  imas visak koordinata 

Ne razumem što je teško pročitati jebeni warning, otići na tu liniju i videti šta ne štima.
SetPlayerPos(playerid,1298.8484,-798.4863,84.1406,345.5254);
Dodao si jedan parametar viška.
SetPlayerPos(playerid,1298.8484,-798.4863,84.1406);


Edit: i ovo
if(IsPlayerInRangeOfPoint(playerid, 2.0 ,1298.8484,-798.4863,84.1406,345.5254))
U
if(IsPlayerInRangeOfPoint(playerid, 2.0 ,1298.8484,-798.4863,84.1406))
Poslednja Izmena: Decembar 24, 2019, 13:43:49 POSLE PODNE od Vodka Play




Progress doesn't come from early risers — progress is made by lazy men looking for easier ways to do things. - Robert A. Heinlein

Jednostavno kada postavljas koordinate igraca radis to ovim formatom:


[pawn]SetPlayerPos(playerid, Float:x, Float:y, Float:z);[/pawn]

Ti si koristio i rotaciju tj angle koji ne mozes podesiti pomocu funkcije "SetPlayerPos" vec preko:

[pawn]SetPlayerFacingAngle(playerid, Float:ang);[/pawn]
Third-party Pawn Developer

[pawn]public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
   if(newkeys & KEY_SECONDARY_ATTACK)
   {
       if(IsPlayerInRangeOfPoint(playerid, 2.0 ,1298.8484,-798.4863,84.1406))
      {
         SetPlayerInterior(playerid,3);
         SetPlayerPos(playerid,942.171997,-16.542755,1000.929687);
         SetCameraBehindPlayer(playerid);
         SendClientMessage(playerid,-1,"Usao si u bazu Yakuze");
      }
      else if(IsPlayerInRangeOfPoint(playerid, 2.0 ,942.171997,-16.542755,1000.929687))
      {
          SetPlayerInterior(playerid,0);
          SetPlayerPos(playerid,1298.8484,-798.4863,84.1406);
          SetCameraBehindPlayer(playerid);
          SendClientMessage(playerid,-1,"Izasao si iz Yakuzine privatne sobe");
      }
      if(IsPlayerInRangeOfPoint(playerid, 2.0 ,1258.8302,-785.4825,92.0302))
      {
         SetPlayerInterior(playerid,2);
         SetPlayerPos(playerid,1523.509887,-47.821197,1002.130981);
         SetCameraBehindPlayer(playerid);
         SendClientMessage(playerid,-1,"Usao si u bazu Yakuzinu privatnu sobu");
      }
      else if(IsPlayerInRangeOfPoint(playerid, 2.0 ,1523.509887,-47.821197,1002.130981))
      {
          SetPlayerInterior(playerid,0);
          SetPlayerPos(playerid,1258.8302,-785.4825,92.0302);
          SetCameraBehindPlayer(playerid);
          SendClientMessage(playerid,-1,"Izasao si iz Yakuzine privatne sobe");
      }
   }
         
   return 1;
}[/pawn]


Github: Momenzi
Pikaboot: Website