SA-MP Forums Archive
help error ";" ")" - 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)
+--- Thread: help error ";" ")" (/showthread.php?tid=507120)



help error ";" ")" - cuchipkg - 16.04.2014

Код HTML:
D:\BS\mode dang edit\BS.pwn(1103) : error 012: invalid function call, not a valid address
D:\BS\mode dang edit\BS.pwn(1103) : warning 215: expression has no effect
D:\BS\mode dang edit\BS.pwn(1103) : error 001: expected token: ";", but found ")"
D:\BS\mode dang edit\BS.pwn(1103) : error 029: invalid expression, assumed zero
D:\BS\mode dang edit\BS.pwn(1103) : fatal error 107: too many error messages on one line

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


4 Errors.
this code error
Код HTML:
VehInSystem(XeInfo[XeLSL][EVVehID]) = 1;



Re: help error ";" ")" - cuchipkg - 16.04.2014

help


Re: help error ";" ")" - PrinceKumar - 16.04.2014

Post here previous lines problem could be there
and also post your vehinsys.. Code


Re: help error ";" ")" - Flake. - 16.04.2014

Show us your VehInSystem enum


Re: help error ";" ")" - Konstantinos - 16.04.2014

I guess you confused about setting and checking a value. Is this what you wanted to do?
pawn Код:
if (VehInSystem(XeInfo[XeLSL][EVVehID]) == 1)
{
    // code..
}



Re: help error ";" ")" - Equuuuin0X - 16.04.2014

@Konstantinos

I believe ''= 1;'' is for setting a player to an enum, not for ''if'' function.


Re: help error ";" ")" - Konstantinos - 16.04.2014

Quote:
Originally Posted by Equuuuin0X
Посмотреть сообщение
@Konstantinos

I believe ''= 1;'' is for setting a player to an enum, not for ''if'' function.
Calling a function and directly setting to 1 is invalid. His code makes no sense that's why I said:
Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
I guess you confused about setting and checking a value.
And you can assign a value to any variable not "for setting a player to an enum" only*.


Re: help error ";" ")" - Equuuuin0X - 16.04.2014

Sorry, didnt notice the texts.

Well in that case, ye do what Kons's said. I use ''setting an enum'' for that, efficient style.


Re: help error ";" ")" - cuchipkg - 16.04.2014

Quote:
Originally Posted by (*|Flake|*)
Посмотреть сообщение
Show us your VehInSystem enum
tow code for vehinsystem
Код HTML:
new VehInSystem[MAX_VEHICLES];
Код HTML:
if(VehInSystem[vehicleid] == 1)
	{
	    new string[128];
	   	new EVSystemID = VehEVID[vehicleid];
   		format(String, 128, "System ID : %d {ADFF2F}| {FFFFFF}Model : %s", EVSystemID, VehNames[ EvoVehicles[ EVSystemID ][EVModel]-400 ]);
		SendClientMessage(playerid, COLOR_GREY, string);
		if(!strfind(EvoVehicles[ EVSystemID ][EVOwner], "Showroom", true))
		{
		    SendClientMessage(playerid, COLOR_GREY, "This vehicle is for sale in Showroom.");
		}
		else
		{
		    if(!strfind("-", EvoVehicles[ EVSystemID ][EVOwner], true)) return SendClientMessage(playerid, COLOR_GREY, "This vehicle doesn't have any owner and it is for sale.");
			if(!strfind(GetName(playerid), EvoVehicles[ EVSystemID ][EVOwner], true))
			{
				SendClientMessage(playerid, COLOR_GREY, "Welcome to Your Vehicle");
			}
			else
			{
			    format(String, 128, "This vehicles owner is {ADFF2F}%s", EvoVehicles[ EVSystemID ][EVOwner]);
			    SendClientMessage(playerid, COLOR_GREY, string);
			}
		}
	}



Re: help error ";" ")" - Conradus - 16.04.2014

I think you have to change this:
Код:
VehInSystem(XeInfo[XeLSL][EVVehID]) = 1;
To this:
Код:
VehInSystem[XeInfo[XeLSL][EVVehID]] = 1;