How to make a command work only at a certain spot
#1

Sorry for another post its just that its confusing well anyways ive tried if (PlayerToPoint(100,playerid, XXXX, YYYY, ZZZZ))

and it gives me this error:

Код:
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2193) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2222) : error 004: function "SafeGivePlayerMoney" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2258) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2259) : error 004: function "SafeGivePlayerWeapon" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2286) : error 004: function "SafeResetPlayerWeapons" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2757) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2768) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2780) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2784) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2796) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2800) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2804) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2808) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2812) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2816) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2820) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2824) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2836) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2840) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2844) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2848) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2852) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2864) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2868) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2872) : error 004: function "PlayerToPoint" is not implemented
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(2884) : error 004: function "PlayerToPoint" is not implemented

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.
Reply
#2

You are missing somewhere this { or this }
Reply
#3

i put another } at the bottom now i got 2 errors:

Код:
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(29204) : error 001: expected token: "*then", but found ")"
C:\Users\Alex\Downloads\PimpTown RPG V1.0\gamemodes\larp3.pwn(29204) : error 029: invalid expression, assumed zero
Reply
#4

Srry for repost but.. here is the Code that im using
Код:
 if(!strcmp(cmdtext, "/equip",true))
{
if PlayerToPoint(100,playerid, 2137.6677,-2273.7737,14.7734))
{
	if(PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 6 || PlayerInfo[playerid][pMember] == 6)
	{
	SafeGivePlayerWeapon(playerid, 5, 1);
	SafeGivePlayerWeapon(playerid, 24, 100);
	SafeGivePlayerWeapon(playerid, 25, 100);
	SafeGivePlayerWeapon(playerid, 34, 100);
	SafeGivePlayerWeapon(playerid, 29, 100);
	}
	return 1;
}
}
Reply
#5

pawn Код:
if(strcmp(cmd, "/equip", true) == 0)
{
  if(PlayerToPoint(100,playerid, 2137.6677,-2273.7737,14.7734))
  {
    if(PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pMember] == 6)
    {
      SafeGivePlayerWeapon(playerid, 5, 1);
      SafeGivePlayerWeapon(playerid, 24, 100);
      SafeGivePlayerWeapon(playerid, 25, 100);
      SafeGivePlayerWeapon(playerid, 34, 100);
      SafeGivePlayerWeapon(playerid, 29, 100);
    }
  }
  return 1;
}
Reply
#6

1. Correct your indenting, it's kinda strange, search for an indenting topic you should find it.
2. You have !strcmp which doesn't exist, if it would exist it would be like "if it's not compared" -_- .

Take a look at https://sampwiki.blast.hk/wiki/Strcmp
Reply
#7

pawn Код:
if (PlayerToPoint(100,playerid, 2137.6677,-2273.7737,14.7734))
Reply
#8

Thanks guys!! thank you Dujma for a fixed code thanks to FUNextreme for reminding me i deleted the ( in PlayerToPoint and thank you TheAngel for trying to help me!
Reply
#9

Quote:
Originally Posted by zanakinz
Thanks guys!! thank you Dujma for a fixed code thanks to FUNextreme for reminding me i deleted the ( in PlayerToPoint and thank you TheAngel for trying to help me!
No problem and you should leave this How to make a command work only at a certain spot topic subject because maybe someone else will have this problem and when he use search he wont find this...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)