help error ";" ")"
#1

Код 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;
Reply
#2

help
Reply
#3

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

Show us your VehInSystem enum
Reply
#5

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

@Konstantinos

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

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

Sorry, didnt notice the texts.

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)