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



/tune - ghost_in_dark - 24.03.2009

hi i downloaded this /tune fs:

http://forum.sa-mp.com/index.php?topic=38914.0

and it works fine nice script caki. but i want to do that only carmechanics can use this command here my code:

http://pastebin.com/m3daa8a7e

and now the errors^^

C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\filterscripts\tuningcarv1.1.pwn(295) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\filterscripts\tuningcarv1.1.pwn(295) : warning 215: expression has no effect
C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\filterscripts\tuningcarv1.1.pwn(295) : error 001: expected token: ";", but found "]"
C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\filterscripts\tuningcarv1.1.pwn(295) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\filterscripts\tuningcarv1.1.pwn(295) : fatal error 107: too many error messages on one line

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


4 Errors.

hope you can help me

thanks to beforehand

mfg ghost


Re: /tune - MenaceX^ - 24.03.2009

Why the whole script?...

Post here the lines with the errors and the command.


Re: /tune - ghost_in_dark - 24.03.2009

Код:
public OnPlayerCommandText(playerid, cmdtext[]) {
if(PlayerInfo[playerid][pJob] != 7)
		  {
		    SendClientMessage(playerid, COLOR_GREY, "  You are not a Car Mechanic!");
		    return 1;
		  }
		else
	if(strcmp(cmdtext, "/tune", true) == 0) {
		new playerstate = GetPlayerState(playerid);
		if(playerstate == PLAYER_STATE_DRIVER) {
		  return ModCar(playerid);
		}
		else {
		  return SendClientMessage(playerid, COLOR_RED, "[ERROR] You cannot modify/tune a car unless you are the driver.");
		}
	}
	return 0;
}



Re: /tune - MenaceX^ - 24.03.2009

pawn Код:
if(!strcmp(cmd,"/tune",true))
{
  if(PlayerInfo[playerid][pJob]!=7) return SendClientMessage(playerid,COLOR_GREY,"  You are not a car mechanic!");
  new state=GetPlayerState(playerid);
  if(state!=PLAYER_STATE_DRIVER) return SendClientMessage(playerid,COLOR_RED,"ERROR: You cannot modify/tune a car unless youre the driver.");
  return ModCar(playerid);
}



Re: /tune - ghost_in_dark - 24.03.2009

now i got these errors

C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\filterscripts\tuningcarv1.1.pwn(297) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\filterscripts\tuningcarv1.1.pwn(297) : warning 215: expression has no effect
C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\filterscripts\tuningcarv1.1.pwn(297) : error 001: expected token: ";", but found "]"
C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\filterscripts\tuningcarv1.1.pwn(297) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\filterscripts\tuningcarv1.1.pwn(297) : fatal error 107: too many error messages on one line

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


4 Errors.



Re: /tune - MenaceX^ - 24.03.2009

Quote:
Originally Posted by ghost_in_dark
now i got these errors

C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\filterscripts\tuningcarv1.1.pwn(297) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\filterscripts\tuningcarv1.1.pwn(297) : warning 215: expression has no effect
C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\filterscripts\tuningcarv1.1.pwn(297) : error 001: expected token: ";", but found "]"
C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\filterscripts\tuningcarv1.1.pwn(297) : error 029: invalid expression, assumed zero
C:\Program Files\Rockstar Games\Grand Theft Auto San Andreas\filterscripts\tuningcarv1.1.pwn(297) : fatal error 107: too many error messages on one line

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


4 Errors.
Line?


Re: /tune - MenaceX^ - 24.03.2009

pawn Код:
if(!strcmp(cmd,"/tune",true))
{
  if(PlayerInfo[playerid][pJob]!=7) return SendClientMessage(playerid,COLOR_GREY,"  You are not a car mechanic !");
  if(!IsPlayerInAnyVehicle(playerid)||GetPlayerState(playerid)!=PLAYER_STATE_DRIVER) return SendClientMessage(playerid,COLOR_GREY,"You must be in the driver's seat.");
  return ModCar(playerid);
}
But I don't think you can use ModCar on a player.. Post ModCar here.



Re: /tune - ghost_in_dark - 24.03.2009

Код:
  if(PlayerInfo[playerid][pJob]!=7) return SendClientMessage(playerid,COLOR_GREY,"  You are not a car mechanic !");
this line,

with your last code same errors modcar on player is working all errors are in th line above but thanks for your help buddy


Re: /tune - MenaceX^ - 24.03.2009

Nothing is wrong there.


Re: /tune - ghost_in_dark - 24.03.2009

i was wandering too when i saw these errors cause i cant find any errors in this line but he shows that there are some...