SA-MP Forums Archive
Command 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: Command Help (/showthread.php?tid=138450)



Command Help - BrokenBlades1992 - 01.04.2010

Well i scripted a command and i get 3 errors that i need help with and i cant seem to fix it Code below


Код:
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\DRRP.pwn(11915) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\DRRP.pwn(11917) : error 010: invalid function or declaration
C:\Program Files\Rockstar Games\GTA San Andreas\gamemodes\DRRP.pwn(11930) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
11915 if(strcmp(cmd, "/drivinglaws", true) == 0)
11917 if(IsPlayerConnected(playerid))
11930 return 1;

Please help me



Re: Command Help - wafffllesss - 01.04.2010

Show the whole code. ( i bet is a bracket problem...)


Re: Command Help - BrokenBlades1992 - 01.04.2010

Код:
if(strcmp(cmd, "/drivinglaws", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
		  SendClientMessage(playerid, COLOR_RED,"Stop at all red lights.");
		  SendClientMessage(playerid, COLOR_RED,"Go a decent speed on roads. Roads: 35 mph High Ways: 65");
		  SendClientMessage(playerid, COLOR_RED,"No sidewalk driving");
		  SendClientMessage(playerid, COLOR_RED,"If a cop has his sirens on pull over to the side of the road.");
		  SendClientMessage(playerid, COLOR_RED,"You must have a driving license to drive on the roads legally.");
		  SendClientMessage(playerid, COLOR_RED,"Do not smash stuff up.");
		  SendClientMessage(playerid, COLOR_RED,"If a cop is pulling you over pull over!");
		  SendClientMessage(playerid, COLOR_RED,"Do not ram into people, This is not bumper cars!!");
		  SendClientMessage(playerid, COLOR_RED,"No street racing ");
		  SendClientMessage(playerid, COLOR_RED,"Look on our site for a more updated list if any: deltaresponsegaming.tk!");
		}
		return 1;
	}



Re: Command Help - BrokenBlades1992 - 02.04.2010

Any help please?


Re: Command Help - wafffllesss - 02.04.2010

Sorry, was having my dinner. So.. this code compiles fine to me... must be somewhere else


Re: Command Help - BrokenBlades1992 - 02.04.2010

Hm really i might have it under the wrong place let me check



Re: Command Help - BrokenBlades1992 - 02.04.2010

Where do you have this code under?


Re: Command Help - wafffllesss - 02.04.2010

under OnPlayerCommandText


Re: Command Help - BrokenBlades1992 - 02.04.2010

Hm thats weird i have it under there to

Edit: Never mind i got it to compile nicely now. Thanks for verifying that it compiles nicely though wafffllesss