Invalid expression, assumed zero
#1

Hello im working on a small filterscript when i got the error number 029 (Invalid expression, assumed zero) on this code

Код:
	if(GetVehicleModel(vehicleid) == 586 || GetVehicleModel(vehicleid == 448) || GetVehicleModel(vehicleid) == 463 || GetVehicleModel(vehicleid) == 522 || GetVehicleModel(vehicleid) == 468 || GetVehicleModel(vehicleid) == 533 || GetVehicleModel(vehicleid) == 555 || (GetVehicleModel(vehicleid) == 482 || GetVehicleModel(vehicleid) == 455)
	{
		if(ispassenger == 0)
		{
Its the { under the GetVehicleModel's that haves the error. I have been looking for whats wrong for long but out of ideas. And im sure on its some weird mistake and im just too blind to see it.


Note above the code i have a similar code with only 1 vehicle type and that has no errors
Reply
#2

Quote:
Originally Posted by Desert
Hello im working on a small filterscript when i got the error number 029 (Invalid expression, assumed zero) on this code

Код:
	if(GetVehicleModel(vehicleid) == 586 || GetVehicleModel(vehicleid == 448) || GetVehicleModel(vehicleid) == 463 || GetVehicleModel(vehicleid) == 522 || GetVehicleModel(vehicleid) == 468 || GetVehicleModel(vehicleid) == 533 || GetVehicleModel(vehicleid) == 555 || (GetVehicleModel(vehicleid) == 482 || GetVehicleModel(vehicleid) == 455)
	{
		if(ispassenger == 0)
		{
Its the { under the GetVehicleModel's that haves the error. I have been looking for whats wrong for long but out of ideas. And im sure on its some weird mistake and im just too blind to see it.


Note above the code i have a similar code with only 1 vehicle type and that has no errors
GetVehicleModel(vehicleid == 448)

pawn Код:
GetVehicleModel(vehicleid) == 448
Reply
#3

Thanks for finding that one

But error still comes after changing it
Reply
#4

Quote:
Originally Posted by Desert
Thanks for finding that one

But error still comes after changing it
Sorry.
if(GetVehicleModel(vehicleid) == 586 || GetVehicleModel(vehicleid == 448) || GetVehicleModel(vehicleid) == 463 || GetVehicleModel(vehicleid) == 522 || GetVehicleModel(vehicleid) == 468 || GetVehicleModel(vehicleid) == 533 || GetVehicleModel(vehicleid) == 555 || (GetVehicleModel(vehicleid) == 482 || GetVehicleModel(vehicleid) == 455)
Simplifield:
pawn Код:
new
      model = GetVehicleModel(vehicleid);
     
    if(model == 586 || model == 448 || model == 463 || model == 522 || model == 468 || model == 533 || model == 555 || model == 482 || model == 455)
    {
Reply
#5

Thanks that 1 did the job
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)