SA-MP Forums Archive
error 029: invalid expression, assumed zero - 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: error 029: invalid expression, assumed zero (/showthread.php?tid=454525)



error 029: invalid expression, assumed zero - DonBonanno - 29.07.2013

Hello everybody.I compiled my GM,all okay.I compiled my gm again,all okay.But once ,this error: error 029: invalid expression, assumed zero he appeared suddenly...Why ?

Код:
new InBusiness[MAX_PLAYERS], CheckReady[MAX_PLAYERS], ClothesSelected[MAX_PLAYERS], nMuted[MAX_PLAYERS], NewbieTimer[MAX_PLAYERS], WeaponTo[MAX_PLAYERS], WeaponSell[MAX_PLAYERS], WeaponGun[MAX_PLAYERS], WeaponAmmo[MAX_PLAYERS], WeaponPrice[MAX_PLAYERS];
new SQL_Query[1024], ClockTimer, Hour, Minute, Second, Text:Clock, WaitingTime[MAX_PLAYERS], WaitingTimer[MAX_PLAYERS], Text3D:masklabel[MAX_PLAYERS], Engine[MAX_VEHICLES], Lights[MAX_VEHICLES], Text:EngineOffTD;
new Float:WeedPlantX[MAX_PLAYERS], Float:WeedPlantY[MAX_PLAYERS], Float:WeedPlantZ[MAX_PLAYERS], WeedReady[MAX_PLAYERS], WeedPlanted[MAX_PLAYERS], WeedObject[MAX_PLAYERS], Float:SpecX[MAX_PLAYERS], Float:SpecY[MAX_PLAYERS], Float:SpecZ[MAX_PLAYERS];
new Siren[MAX_VEHICLES], LightPwr[MAX_VEHICLES], Flasher[MAX_VEHICLES], FlasherState[MAX_VEHICLES], FlashTimer, GateOpen, ClickStop[MAX_PLAYERS];
new VehicleSell[MAX_PLAYERS], VehicleSellPrice[MAX_PLAYERS], HouseSell[MAX_PLAYERS], HouseSellPrice[MAX_PLAYERS], Fined[MAX_PLAYERS], FinePrice[MAX_PLAYERS];
new WeedSell[MAX_PLAYERS], WeedSellPrice[MAX_PLAYERS], WeedSellAmount[MAX_PLAYERS], MethSell[MAX_PLAYERS], MethSellPrice[MAX_PLAYERS], MethSellAmount[MAX_PLAYERS];
new CocaineSell[MAX_PLAYERS], CocaineSellPrice[MAX_PLAYERS], CocaineSellAmount[MAX_PLAYERS], FDGate1, FDGate2, FDGate3, FDGate4, FDGate5, HGate1;
new SirenObject[MAX_VEHICLES], Spectating[MAX_PLAYERS], DraggedBy[MAX_PLAYERS], DrugTimer[MAX_PLAYERS], DrugCount[MAX_PLAYERS], Dragging[MAX_PLAYERS];
new Weather, pTazer[MAX_PLAYERS], pTazed[MAX_PLAYERS], PlayerCuffed[MAX_PLAYERS], MDCName[MAX_PLAYERS][24], gPlayerAnimLibsPreloaded[MAX_PLAYERS], Text:AnimText, Text:Website, VehicleFuel[MAX_VEHICLES], FuelTimer[MAX_PLAYERS], Text:FuelTD[MAX_PLAYERS];
new AJailTimer[MAX_PLAYERS], ArrestTimer[MAX_PLAYERS], StipObj[MaxStrips], Float:StipPos[MaxStrips][3], TotalStrips = 0;
new PhoneBatteryTimer[MAX_PLAYERS], ShakeRequested[MAX_PLAYERS], InAnimation[MAX_PLAYERS], aDuty[MAX_PLAYERS], pDuty[MAX_PLAYERS], mDuty[MAX_PLAYERS], mPager[MAX_PLAYERS];
new Windows[MAX_VEHICLES], OnPhone[MAX_PLAYERS], NumberCalled[MAX_PLAYERS], Calling[MAX_PLAYERS], PoliceStep[MAX_PLAYERS];
new ivCreated[MAX_VEHICLES], TotalVehiclesCreated, TotalPlayerVehicles[MAX_PLAYERS], Hospitalized[MAX_PLAYERS], bool:Weapon[MAX_PLAYERS][47];
new Logged[MAX_PLAYERS], FirstSpawn[MAX_PLAYERS], AssistanceNeeded[MAX_PLAYERS], Assisting[MAX_PLAYERS], ChangingSkin[MAX_PLAYERS], DMVCar[MAX_PLAYERS], DMVCarSection[MAX_PLAYERS], AdminCar[MAX_PLAYERS], VehicleFaction[MAX_VEHICLES], Text:Speedometer[MAX_PLAYERS], OnQuiz[MAX_PLAYERS];
new OldCar[MAX_PLAYERS], Text3D:BusinessLabel[MAX_BUSINESS], Text3D:HouseLabel[MAX_HOUSES], AFKReason[128][MAX_PLAYERS], AFKStat[MAX_PLAYERS], QuizRight[MAX_PLAYERS], TutAllowed[MAX_PLAYERS], InvitedTo[MAX_PLAYERS], AccessingTrunk[MAX_PLAYERS], SpeedoTimer[MAX_PLAYERS];
new Fishing[MAX_PLAYERS], Text:TopBarTD, Text:BottomBarTD, Text:NewsTimeTD, Text:ReporterTD, Text:NewsLiveTD, Text:NewsCallTD, NewsClockTimer, NewsOn, IStartedNews[MAX_PLAYERS];
new Float:NewsX[MAX_PLAYERS], Float:NewsY[MAX_PLAYERS], Float:NewsZ[MAX_PLAYERS], WatchingNews[MAX_PLAYERS], NewsStartedBy;
new FireObject, SmokeObject, FireHealth, FireTimer, FPSObject[MAX_PLAYERS], Text3D:FireText;
Errors :

Код:
D:\Servere SAMP\Hard Life Roleplay\VCRP\gamemodes\subrp.pwn(507) : error 029: invalid expression, assumed zero
D:\Servere SAMP\Hard Life Roleplay\VCRP\gamemodes\subrp.pwn(509) : error 029: invalid expression, assumed zero
D:\Servere SAMP\Hard Life Roleplay\VCRP\gamemodes\subrp.pwn(513) : error 029: invalid expression, assumed zero
D:\Servere SAMP\Hard Life Roleplay\VCRP\gamemodes\subrp.pwn(514) : error 029: invalid expression, assumed zero
D:\Servere SAMP\Hard Life Roleplay\VCRP\gamemodes\subrp.pwn(517) : error 029: invalid expression, assumed zero
D:\Servere SAMP\Hard Life Roleplay\VCRP\gamemodes\subrp.pwn(518) : error 029: invalid expression, assumed zero
D:\Servere SAMP\Hard Life Roleplay\VCRP\gamemodes\subrp.pwn(519) : error 029: invalid expression, assumed zero
Код:
509 : new Siren[MAX_VEHICLES], LightPwr[MAX_VEHICLES], Flasher[MAX_VEHICLES], FlasherState[MAX_VEHICLES], FlashTimer, GateOpen, ClickStop[MAX_PLAYERS];
513 : new SirenObject[MAX_VEHICLES], Spectating[MAX_PLAYERS], DraggedBy[MAX_PLAYERS], DrugTimer[MAX_PLAYERS], DrugCount[MAX_PLAYERS], Dragging[MAX_PLAYERS];
514 : new Weather, pTazer[MAX_PLAYERS], pTazed[MAX_PLAYERS], PlayerCuffed[MAX_PLAYERS], MDCName[MAX_PLAYERS][24], gPlayerAnimLibsPreloaded[MAX_PLAYERS], Text:AnimText, Text:Website, VehicleFuel[MAX_VEHICLES], FuelTimer[MAX_PLAYERS], Text:FuelTD[MAX_PLAYERS];
517 : new Windows[MAX_VEHICLES], OnPhone[MAX_PLAYERS], NumberCalled[MAX_PLAYERS], Calling[MAX_PLAYERS], PoliceStep[MAX_PLAYERS];
518 : new ivCreated[MAX_VEHICLES], TotalVehiclesCreated, TotalPlayerVehicles[MAX_PLAYERS], Hospitalized[MAX_PLAYERS], bool:Weapon[MAX_PLAYERS][47];
519 : new Logged[MAX_PLAYERS], FirstSpawn[MAX_PLAYERS], AssistanceNeeded[MAX_PLAYERS], Assisting[MAX_PLAYERS], ChangingSkin[MAX_PLAYERS], DMVCar[MAX_PLAYERS], DMVCarSection[MAX_PLAYERS], AdminCar[MAX_PLAYERS], VehicleFaction[MAX_VEHICLES], Text:Speedometer[MAX_PLAYERS], OnQuiz[MAX_PLAYERS];



Re: error 029: invalid expression, assumed zero - DonBonanno - 29.07.2013

Anybody


Re: error 029: invalid expression, assumed zero - ToiletDuck - 29.07.2013

i think you forgot toadd something in this
pawn Код:
, FlashTimer, GateOpen,



Re: error 029: invalid expression, assumed zero - DonBonanno - 29.07.2013

No...can someone help me please ? I need to resolve this today...please


Re: error 029: invalid expression, assumed zero - Konstantinos - 29.07.2013

Use one variable per line. If it gives the error again, you're going to know from where it comes.
pawn Код:
new
    InBusiness[MAX_PLAYERS],
    CheckReady[MAX_PLAYERS],
    ClothesSelected[MAX_PLAYERS],
    // rest of them
    FireTimer,
    FPSObject[MAX_PLAYERS],
    Text3D:FireText
;



Re: error 029: invalid expression, assumed zero - Red_Dragon. - 29.07.2013

This code is an eyesore! Use the above solution (which is to use one variable per line) to avoid this huge mess of the code and to know exactly which variable caused the problem.


Re: error 029: invalid expression, assumed zero - DonBonanno - 29.07.2013

Ok..problem is :

Engine[MAX_VEHICLES],
Text:EngineOffTD,
Siren[MAX_VEHICLES],
SirenObject[MAX_VEHICLES],
VehicleFuel[MAX_VEHICLES],
Windows[MAX_VEHICLES],
VehicleFaction[MAX_VEHICLES],



What i need to do now ?


Re: error 029: invalid expression, assumed zero - Konstantinos - 29.07.2013

From what I see is about MAX_VEHICLES, except the textdraw. It's weird though.

Re-define MAX_VEHICLES
pawn Код:
#include <a_samp>

#undef MAX_VEHICLES
#define MAX_VEHICLES 2000



Re: error 029: invalid expression, assumed zero - DonBonanno - 29.07.2013

Oh,my bad...
In my GM i have :

undef MAX_VEHICLE
define MAX_VEHICLE 2000t
I deleted `t` ..
Thanks


Re: error 029: invalid expression, assumed zero - Konstantinos - 29.07.2013

Mistakes happen. Anyways, you're welcome!