1 small error
#1

I wanted to make a /takedrugs command so that it gives the player drugs, to sell later on

but I get this error

Код:
C:\Users\Decoster Joeri\Desktop\World RPG\gamemodes\WRPGv1.0-1.pwn(7107) : error 001: expected token: ")", but found "{"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
And when I change the { with a ) , the compiler crashes

the piece, line 7107 is the line with the { under the 2nd IF

Код:
	if(strcmp(cmd, "/takedrugs", true) == 0)
	{
		if(PlayerToPoint(4, playerid, 2552.4688,-1294.3380,1060.9844)
		{
      PlayerInfo[giveplayerid][pDrugs] = 500;
	  }
	  else
   	{
		SendClientMessage(playerid, COLOR_RED, "You cannot use this command because you are not at the Crack factory.");
	  }
		return 1;
	}
Thanks for helping
Reply
#2

Maybe read the error and check again:

if(PlayerToPoint(4, playerid, 2552.4688,-1294.3380,1060.9844)

if(PlayerToPoint(4, playerid, 2552.4688,-1294.3380,1060.9844))
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)