DayZ
GDNGHT Nov 28, 2020 @ 4:49pm
WHATS WRONG??
can someone tell me whats wrong. i placed custom buildings on my server and put locations into init.c but at server start i am getting:

Can't compile mission init script'!
$CurrentDir:mpmissions\dayzOffline.chernarusplus\init.c(4): Broken expression (missing ';'?)

i added only these lines into init.c so there must be some something wrong.



//SPAWN HELPER FUNCTIONS----------------------------
void SpawnObject( string type, vector position, vector orientation )
{
auto obj = GetGame().CreateObject_WIP( type, position, ECE_CREATEPHYSICS );
obj.SetFlags( EntityFlags.STATIC, false );
obj.SetPosition( position );
obj.SetOrientation( orientation );
obj.SetOrientation( obj.GetOrientation() ); //Collision fix
obj.Update();
obj.SetAffectPathgraph( true, false );
if( obj.CanAffectPathgraph() ) GetGame().GetCallQueue( CALL_CATEGORY_SYSTEM ).CallLater( GetGame().UpdatePathgraphRegionByObject, 100, false, obj );
}

void main()
{
//Your custom spawned objects
SpawnObject( "Land_Mil_Barracks2", "11900.799805 141.318359 12543.246094", "-66.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "11923.792969 141.318359 12533.049805", "-66.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "11861.200195 141.318359 12561.022461", "-66.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "11841.713867 141.318359 12569.652344", "-66.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "11820.200195 141.318359 12579.200195", "-66.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "12022.590820 140.000000 12497.038086", "-68.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "12019.000000 140.000000 12487.936523", "-68.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "12015.500000 140.000000 12479.214844", "-68.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "12012.130859 140.000000 12470.500000", "-68.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "12041.741211 140.000000 12489.200195", "113.000130 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "12038.000000 140.000000 12480.349609", "112.999969 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "12034.200195 140.000000 12471.559570", "112.999992 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_1", "12030.584961 140.000000 12463.090820", "112.999992 0.000000 0.000000" );
SpawnObject( "Land_Mil_Airfield_HQ", "12096.731445 145.792877 12498.676758", "-68.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_ATC_Big", "12122.867188 155.739822 12478.970703", "-159.000000 0.000000 0.000000" );
SpawnObject( "Land_Airfield_Hangar_Green", "12206.845703 145.954712 12523.251953", "22.000011 0.000000 0.000000" );
SpawnObject( "Land_Airfield_Hangar_Green", "12243.059570 145.954712 12508.609375", "22.000011 0.000000 0.000000" );
SpawnObject( "Land_Airfield_Hangar_Green", "12277.629883 145.987534 12494.518555", "22.000011 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks5", "12160.233398 145.674652 12476.412109", "22.000013 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks6", "12238.732422 139.974945 12411.493164", "22.999996 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks6", "12224.900391 140.000000 12443.616211", "111.999992 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks6", "12271.556641 140.000000 12422.400391", "-68.000000 0.000000 0.000000" );
SpawnObject( "Land_Container_1Mo", "12254.863281 141.209244 12427.025391", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Ruin_Mil_ControlTower", "12247.967773 141.450119 12431.089844", "-59.999992 0.000000 0.000000" );
SpawnObject( "Land_Container_1Moh", "12243.663086 141.209244 12441.989258", "-51.000000 0.000000 0.000000" );
SpawnObject( "Land_Container_1Bo", "12239.887695 141.209244 12430.234375", "36.999996 0.000000 0.000000" );
SpawnObject( "Land_Container_1Bo", "12258.469727 141.209244 12441.705078", "-33.000004 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks_Round", "12187.016602 141.228043 12467.442383", "-158.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks_Round", "12207.873047 141.228043 12459.032227", "-158.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks_Round", "12197.290039 141.228043 12463.398438", "-158.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12021.400391 141.122665 12466.435547", "20.000008 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12024.360352 141.123001 12474.506836", "20.000008 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12027.621094 141.122665 12483.235352", "20.000008 0.000000 0.000000" );
SpawnObject( "Land_Mil_CamoNet_Roof_east", "12031.119141 141.122665 12492.071289", "20.000006 0.000000 0.000000" );
SpawnObject( "Ruins", "12049.698242 139.820480 12470.044922", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks1", "12041.161133 141.947128 12575.830078", "111.999969 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks1", "12055.751953 141.947128 12569.891602", "112.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks1", "12069.321289 141.947128 12564.228516", "112.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks4", "12088.230469 141.579086 12556.311523", "112.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks4", "12098.049805 141.579086 12552.428711", "112.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_AircraftShelter", "12432.479492 140.000000 12391.554688", "111.999969 0.000000 0.000000" );
SpawnObject( "Land_Mil_GuardTower", "12368.163086 146.294418 12389.542969", "20.000017 0.000000 0.000000" );
< >
Showing 1-3 of 3 comments
LoneWolf Nov 29, 2020 @ 1:19am 
In your init.c file check line 4 at the end there is a missing ;

It needs to end the line.
GDNGHT Nov 29, 2020 @ 2:50am 
ok thanks at least i can get on to server but do you have any suggestions why my custom building arent showing up?
GDNGHT Nov 29, 2020 @ 3:02am 
i need to say i had problems in the past when i was editing players starting loot in init.c

it was very unreliable. sometimes it was working and someties not. do u have any suggestions?

https://gofile.io/d/huRfI0

here is my init.c
< >
Showing 1-3 of 3 comments
Per page: 1530 50

Date Posted: Nov 28, 2020 @ 4:49pm
Posts: 3