#1

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

Why the whole script?...

Post here the lines with the errors and the command.
Reply
#3

Код:
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;
}
Reply
#4

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);
}
Reply
#5

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

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

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

Код:
  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
Reply
#9

Nothing is wrong there.
Reply
#10

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


Forum Jump:


Users browsing this thread: 1 Guest(s)