PDA

View Full Version : help error ";" ")"


cuchipkg
16/04/2014, 04:52 AM
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 (c) 1997-2006, ITB CompuPhase


4 Errors.

this code error
VehInSystem(XeInfo[XeLSL][EVVehID]) = 1;

cuchipkg
16/04/2014, 06:34 AM
help

PrinceKumar
16/04/2014, 06:41 AM
Post here previous lines problem could be there
and also post your vehinsys.. Code

Flake.
16/04/2014, 07:05 AM
Show us your VehInSystem enum

Konstantinos
16/04/2014, 11:17 AM
I guess you confused about setting and checking a value. Is this what you wanted to do?

if (VehInSystem(XeInfo[XeLSL][EVVehID]) == 1)
{
// code..
}

Equuuuin0X
16/04/2014, 11:27 AM
@Konstantinos

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

Konstantinos
16/04/2014, 11:30 AM
@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:
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*.

Equuuuin0X
16/04/2014, 11:33 AM
Sorry, didnt notice the texts.

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

cuchipkg
16/04/2014, 12:59 PM
Show us your VehInSystem enum
tow code for vehinsystem
new VehInSystem[MAX_VEHICLES];
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);
}
}
}

Conradus
16/04/2014, 01:05 PM
I think you have to change this:
VehInSystem(XeInfo[XeLSL][EVVehID]) = 1;

To this:
VehInSystem[XeInfo[XeLSL][EVVehID]] = 1;

cuchipkg
16/04/2014, 02:22 PM
it's work thanks you + REP