SA-MP Forums Archive
warning help - 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: warning help (/showthread.php?tid=131762)



warning help - 02manchestera - 04.03.2010

i know it doesnt mean anything but i like to have a clean script any ideas on this warning.

Код:
if(!strcmp(cmdtext, "/tankwar", true))
  {
  new randomTele = random(sizeof(RandomTeleport));
  SetPlayerPos(playerid, RandomTeleport[randomTele][0], RandomTeleport[randomTele][1], RandomTeleport[randomTele][2], RandomTeleport[randomTele][3]);
  return 1;
  }
Код:
C:\Program Files\Rockstar Games\GTA San Andreas\my server\gamemodes\SFTDMVFgangzone.pwn(1286) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.



Re: warning help - Fedee! - 04.03.2010

Try like this:

pawn Код:
if(!strcmp(cmdtext, "/tankwar", true))
  {
  new randomTele = random(sizeof(RandomTeleport));
  SetPlayerPos(playerid, RandomTeleport[randomTele][0], RandomTeleport[randomTele][1], RandomTeleport[randomTele][2]);
  return 1;
  }
SetPlayerPos is playerid, x, y, z, there you have four: RandomTeleport[randomTele][0](X), RandomTeleport[randomTele][1](Y) , RandomTeleport[randomTele][2](Z), RandomTeleport[randomTele][3](Angle). If you need to set the player rotation use SetPlayerFacingAngle


Re: warning help - 02manchestera - 04.03.2010

Still getting the same warning


Код:
new Float:RandomTeleport[4][4] =
  {
  {-45.0753,1849.4135,17.6406},
  {-28.1576,2071.8328,17.4500},
  {166.6721,1965.9443,18.6305},
  {248.1359,1771.0515,17.6406}
  };
	
//------------------------------------------------------------------------------
  if(!strcmp(cmdtext, "/tankwar", true))
  {
  new randomTele = random(sizeof(RandomTeleport));
  SetPlayerPos(playerid, RandomTeleport[randomTele][0], RandomTeleport[randomTele][1], RandomTeleport[randomTele][2], RandomTeleport[randomTele][3]);
  SetPlayerVirtualWorld(playerid, 5);
  return 1;
  }
This is everything to do with the command


Re: warning help - Fedee! - 04.03.2010

My bad.. lol, try now..


Re: warning help - 02manchestera - 04.03.2010

Working fine thanks so much i just hate them warning as they ust keep biulding up XD thanks again


Re: warning help - Fedee! - 04.03.2010

You're welcome