warning help
#1

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.
Reply
#2

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
Reply
#3

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
Reply
#4

My bad.. lol, try now..
Reply
#5

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

You're welcome
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)