no effect ?!
#1

guys i have 1 problem with scripting ... when i try to script something in my code i get error ...

here is part of code - atm making for car sale

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(vehicleid == Sabre)
	{
	  IsInCarShop[playerid] == 1; -------------------------> ERROR LINE
	  TogglePlayerControllable(playerid,0);
	  TextDrawShowForPlayer(playerid,Text:Textdraw22);
	  TextDrawShowForPlayer(playerid,Text:Textdraw23);
	  TextDrawShowForPlayer(playerid,Text:Textdraw24);
	  TextDrawShowForPlayer(playerid,Text:Textdraw25);
	  TextDrawShowForPlayer(playerid,Text:Textdraw26);
	  TextDrawShowForPlayer(playerid,Text:Textdraw27);
	  TextDrawShowForPlayer(playerid,Text:Textdraw28);
	  TextDrawShowForPlayer(playerid,Text:Textdraw29);
	  TextDrawShowForPlayer(playerid,Text:Textdraw30);
	  TextDrawShowForPlayer(playerid,Text:Textdraw31);
	  TextDrawShowForPlayer(playerid,Text:Textdraw32);
	  TextDrawShowForPlayer(playerid,Text:Textdraw33);
	  TextDrawShowForPlayer(playerid,Text:Textdraw34);
	}
	return 1;
}
so this is code if player want to enter the vehicle he must buy it first before entering ... i think its nice idea

and i get error:

Код:
C:\Documents and Settings\samp\Desktop\Server2\pawno\include\cps.inc(140) : warning 208: function with tag result used before definition, forcing reparse
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\WeedsRP.pwn(726) : warning 215: expression has no effect
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\WeedsRP.pwn(188) : warning 204: symbol is assigned a value that is never used: "Buccaneer"
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\WeedsRP.pwn(185) : warning 204: symbol is assigned a value that is never used: "Clover"
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\WeedsRP.pwn(171) : warning 204: symbol is assigned a value that is never used: "DrugDealJob"
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\WeedsRP.pwn(187) : warning 204: symbol is assigned a value that is never used: "Feltzer"
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\WeedsRP.pwn(172) : warning 204: symbol is assigned a value that is never used: "FisherManJob"
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\WeedsRP.pwn(173) : warning 204: symbol is assigned a value that is never used: "MechanicJob"
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\WeedsRP.pwn(169) : warning 204: symbol is assigned a value that is never used: "PrivMedicJob"
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\WeedsRP.pwn(186) : warning 204: symbol is assigned a value that is never used: "Remington"
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\WeedsRP.pwn(182) : warning 204: symbol is assigned a value that is never used: "Savanna"
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\WeedsRP.pwn(191) : warning 204: symbol is assigned a value that is never used: "Stallion"
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\WeedsRP.pwn(184) : warning 204: symbol is assigned a value that is never used: "Tampa"
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\WeedsRP.pwn(170) : warning 204: symbol is assigned a value that is never used: "TaxiJob"
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\WeedsRP.pwn(174) : warning 204: symbol is assigned a value that is never used: "TerroristJob"
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\WeedsRP.pwn(189) : warning 204: symbol is assigned a value that is never used: "Virgo"
C:\Documents and Settings\samp\Desktop\Server2\gamemodes\WeedsRP.pwn(183) : warning 204: symbol is assigned a value that is never used: "Windsor"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


17 Warnings.
DONT CARE FOR WARRINGS i will add checkpoints and other things later to fix warrings on my own just try to help me with ERROR

anyway here is the full code :

http://pastebin.com/m55c98e71

ty for any help
Reply
#2

Change "==" to "="
Reply
#3

uhh i don't see any errors just a whole load of warnings and what line number is it?
Reply
#4

Код:
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	if(vehicleid == Sabre)
	{
       if(IsInCarShop[playerid] == 1){
	  //IsInCarShop[playerid] = 1; (only 1 =)
	  TogglePlayerControllable(playerid,0);
	  TextDrawShowForPlayer(playerid,Text:Textdraw22);
	  TextDrawShowForPlayer(playerid,Text:Textdraw23);
	  TextDrawShowForPlayer(playerid,Text:Textdraw24);
	  TextDrawShowForPlayer(playerid,Text:Textdraw25);
	  TextDrawShowForPlayer(playerid,Text:Textdraw26);
	  TextDrawShowForPlayer(playerid,Text:Textdraw27);
	  TextDrawShowForPlayer(playerid,Text:Textdraw28);
	  TextDrawShowForPlayer(playerid,Text:Textdraw29);
	  TextDrawShowForPlayer(playerid,Text:Textdraw30);
	  TextDrawShowForPlayer(playerid,Text:Textdraw31);
	  TextDrawShowForPlayer(playerid,Text:Textdraw32);
	  TextDrawShowForPlayer(playerid,Text:Textdraw33);
	  TextDrawShowForPlayer(playerid,Text:Textdraw34);
         }
	}
	return 1;
}
Reply
#5

U can change to:
Код:
TextDrawShowForPlayer(playerid,Textdraw22);
TextDrawShowForPlayer(playerid,Textdraw23);
TextDrawShowForPlayer(playerid,Textdraw24);
TextDrawShowForPlayer(playerid,Textdraw25);
TextDrawShowForPlayer(playerid,Textdraw26);
TextDrawShowForPlayer(playerid,Textdraw27);
TextDrawShowForPlayer(playerid,Textdraw28);
TextDrawShowForPlayer(playerid,Textdraw29);
TextDrawShowForPlayer(playerid,Textdraw30);
TextDrawShowForPlayer(playerid,Textdraw31);
TextDrawShowForPlayer(playerid,Textdraw32);
TextDrawShowForPlayer(playerid,Textdraw33);
TextDrawShowForPlayer(playerid,Textdraw34);
Reply
#6

thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)