Guten Morgen ihr lieben,
ich habe einen RootServer und auf dem läuft ein DayZ Server inkl. Mods. Bis gestern hat alles wunderbar funktioniert. (Was es eigentlich auch immer noch tut)
Folgendes Problem:
Ich habe die Map im Offline Modus bearbeitet und alles genau so gemacht, wie es hier beschrieben ist. (den Lootspawn in den neuen Gebäuden habe ich noch nicht eingestellt)
Sobald ich die neuen Gebäude in der init.c eingebaut habe und im Anschluss daran den Server starte kommt folgende Fehlermeldung:
Can't compile mission init script!
$CurrentDir:mpmission\dayzOffline.chernarusplus\init.c(2): Broken expression (missing';'?)
Leider habe ich bei Google keine Hilfe dazu gefunden...
Edit: Habe gedacht ich habe ein falsches Objekt mit eingebaut, aber selbst wenn ich nur eine Barracke einbaue kommt die Fehlermedung!
Meine init.c :
//Spawn helper function
void SpawnObject()( string type, vector position, vector orientation )
{
auto obj = GetGame().CreateObject( type, position );
obj.SetPosition( position );
obj.SetOrientation( obj.GetOrientation() ); //Collision fix
}
void main()
{
//Your custom spawned objects
SpawnObject( "Land_Mil_Barracks2", "12116.939453 141.368362 12658.617188", "21.000010 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "12121.272461 141.368362 12669.362305", "21.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "12125.048828 141.368362 12679.629883", "21.000000 0.000000 0.000000" );
SpawnObject( "Land_Airfield_Radar_Tall", "12222.742188 162.896454 12632.879883", "-29.000008 0.000000 0.000000" );
SpawnObject( "Land_Airfield_Hangar_Green", "12258.176758 145.954712 12587.310547", "47.500000 0.000000 0.000000" );
SpawnObject( "Land_Airfield_Hangar_Green", "12284.801758 145.954712 12558.336914", "47.500000 0.000000 0.000000" );
SpawnObject( "Land_Airfield_Hangar_Green", "12310.874023 145.954712 12529.825195", "47.500015 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks1", "11862.238281 141.947128 12565.703125", "-65.500000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks1", "11843.400391 141.947128 12574.386719", "-65.500000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks1", "11822.788086 141.947128 12583.720703", "-65.500000 0.000000 0.000000" );
SpawnObject( "Land_Mil_ATC_Big", "12151.563477 155.739822 12549.274414", "21.500002 0.000000 0.000000" );
SpawnObject( "Land_Construction_House2", "12054.345703 142.755280 12581.088867", "-2.000000 0.000000 0.000000" );
SpawnObject( "Land_Construction_House1", "12071.316406 142.182144 12581.926758", "-2.000001 0.000000 0.000000" );
SpawnObject( "Land_Container_1Bo", "12062.465820 141.209244 12563.134766", "-40.000004 0.000000 0.000000" );
SpawnObject( "Land_Container_1Mo", "12066.596680 141.209244 12565.395508", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Construction_Crane", "12082.605469 158.286652 12569.706055", "-160.000000 0.000000 0.000000" );
SpawnObject( "Land_Workshop3", "12114.862305 141.365601 12595.598633", "86.000008 0.000000 0.000000" );
SpawnObject( "Land_Workshop5", "12107.872070 141.393845 12581.162109", "-4.500000 0.000000 0.000000" );
SpawnObject( "Land_Workshop2", "12129.062500 141.223404 12587.497070", "175.999908 0.000000 0.000000" );
SpawnObject( "Land_Power_Pole_Conc1_Amp", "12107.294922 143.514999 12591.653320", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Tank_Medium_Stairs", "12131.711914 141.359879 12545.072266", "111.999992 0.000000 0.000000" );
SpawnObject( "Land_Mil_Airfield_HQ", "12148.263672 145.792877 12435.028320", "-100.000137 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "12121.603516 141.368362 12437.061523", "-67.000061 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "12111.259766 141.368362 12441.394531", "-67.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "12101.311523 141.368362 12445.460938", "-67.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_ReinforcedTank1", "12063.445313 140.000000 12431.857422", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_ReinforcedTank1", "12032.692383 140.000000 12444.741211", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_ReinforcedTank1", "12003.504883 140.000000 12457.417969", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_City_School", "12311.121094 145.927689 12362.108398", "-67.500008 0.000000 0.000000" );
SpawnObject( "Land_Tower_TC3_Red", "12361.624023 140.000000 12359.304688", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big3", "11920.862305 141.170502 12565.993164", "113.500000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_2", "11877.871094 140.000000 12584.092773", "-156.500015 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_3", "11898.948242 140.000000 12574.681641", "-155.500015 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big2_4", "11891.823242 141.997147 12590.426758", "22.500002 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big2_4", "11909.687500 141.886520 12582.871094", "22.500002 0.000000 0.000000" );
SpawnObject( "Wreck_UH1Y", "12329.702148 152.220718 12357.243164", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_Ikarus", "11870.517578 141.437531 12614.201172", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_Lada_Green", "11880.384766 140.661499 12597.807617", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_Caravan_MRust", "11948.793945 141.838379 12505.723633", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_C130J", "12398.538086 145.184143 12405.383789", "-26.000011 0.000000 0.000000" );
SpawnObject( "Land_Hotel_Damaged", "12178.789063 161.261444 12676.034180", "23.000141 0.000000 0.000000" );
SpawnObject( "Wreck_UH1Y", "12167.211914 164.208282 12685.243164", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_C130J", "11995.418945 145.084137 12573.443359", "-30.000004 0.000000 0.000000" );
SpawnObject( "Wreck_Mi8", "11902.598633 141.706940 12455.186523", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_Volha_Police", "11900.398438 140.732635 12531.645508", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_V3S", "11857.332031 141.602951 12580.279297", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_S1023_Beige", "11946.494141 140.999130 12536.714844", "-97.000015 0.000000 0.000000" );
SpawnObject( "Land_Dead_MassGrave", "11925.077148 140.294922 12540.215820", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Dead_MassGrave", "11921.964844 140.294922 12541.255859", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Misc_TrailRoof_Small", "11886.621094 141.228287 12497.495117", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Misc_Toilet_Mobile", "11886.634766 141.220657 12502.004883", "-88.000130 0.000000 0.000000" );
SpawnObject( "CraterLong", "12395.651367 140.027023 12414.701172", "0.000000 0.000000 0.000000" );
SpawnObject( "CraterLong", "12395.785156 140.027023 12421.674805", "0.000000 0.000000 0.000000" );
SpawnObject( "CraterLong", "12396.464844 140.027023 12428.448242", "0.000000 0.000000 0.000000" );
SpawnObject( "HescoBox", "12395.744141 140.046432 12442.968750", "122.157951 0.000000 -90.000000" );
SpawnObject( "Land_Container_1Bo", "12348.313477 141.209244 12401.210938", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Container_1Aoh", "12345.522461 141.209244 12404.958984", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Farm_WaterTower_Small", "12227.592773 145.427856 12590.521484", "-133.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_Uaz", "12230.234375 140.843185 12588.557617", "0.000000 0.000000 0.000000" );
SpawnObject( "Ruins", "12215.600586 140.000000 12536.683594", "0.000000 0.000000 -0.000000" );
SpawnObject( "Land_Wreck_Uaz", "12144.364258 140.843185 12446.466797", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_Uaz", "12141.177734 140.843185 12445.453125", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_Volha_Grey", "12116.363281 140.736938 12472.643555", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_Volha_Blue", "12113.214844 140.736938 12471.983398", "-53.999996 0.000000 0.000000" );
SpawnObject( "Wreck_Mi8", "12115.708984 141.697937 12466.295898", "-145.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_C130J", "12260.258789 145.184143 12527.927734", "16.000004 0.000000 0.000000" );
SpawnObject( "Wreck_UH1Y", "11780.045898 142.193344 12482.701172", "0.000000 0.000000 0.000000" );
SpawnObject( "Wreck_UH1Y", "5014.427734 340.867371 9765.058594", "0.000000 0.000000 0.000000" );
SpawnObject( "Wreck_Mi8", "4155.758789 340.087952 11030.151367", "0.000000 0.000000 0.000000" );
SpawnObject( "Wreck_Mi8", "4169.498047 340.100281 10993.232422", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Hotel_Damaged", "4517.546875 360.335754 10014.368164", "-119.999954 0.000000 0.000000" );
SpawnObject( "Land_Wreck_C130J", "4669.566406 343.984192 10363.304688", "63.000011 0.000000 0.000000" );
SpawnObject( "Land_Wreck_C130J", "4694.270020 344.034180 10319.605469", "61.000000 0.000000 0.000000" );
SpawnObject( "Wreck_UH1Y", "4090.945557 340.925476 10525.182617", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_ATC_Small", "5008.330078 19.951729 2524.747803", "-39.000004 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big2_2", "5278.500488 10.634549 2225.368164", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big3", "5237.083008 10.532684 2225.994629", "-45.999992 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_5", "5249.296387 8.863003 2245.169189", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big1_5", "5261.016113 8.466415 2240.360107", "39.000004 0.000000 0.000000" );
SpawnObject( "Land_Tower_TC3_Red", "5208.436035 9.500000 2161.375244", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Fortified_Nest_Watchtower", "5273.540527 11.196979 2186.113281", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Wreck_C130J", "5251.644043 14.684137 2166.024658", "-30.000006 0.000000 0.000000" );
SpawnObject( "Land_Factory_Small", "5102.276367 15.822468 2426.823975", "142.000046 0.000000 0.000000" );
SpawnObject( "Land_Construction_Crane", "5115.833984 27.358009 2409.103271", "-108.999985 0.000000 -0.000000" );
SpawnObject( "Land_Container_1Bo", "5101.119141 10.662583 2411.317871", "0.000000 0.000000 0.000000" );
SpawnObject( "Land_Container_1Mo", "5096.395020 10.709240 2411.329102", "-39.999996 0.000000 0.000000" );
SpawnObject( "Land_Farm_Hopper", "5086.808594 15.900886 2436.179932", "-127.999939 0.000000 0.000000" );
SpawnObject( "Land_Farm_Hopper", "5083.589355 15.906260 2440.305420", "-127.999977 0.000000 0.000000" );
SpawnObject( "Land_Garage_Office", "5155.796875 12.510460 2328.381104", "50.000004 0.000000 0.000000" );
SpawnObject( "Land_Garage_Row_Small", "5176.676270 11.594050 2304.129150", "-128.999939 0.000000 0.000000" );
SpawnObject( "Land_Repair_Center", "5166.142090 11.427272 2318.984375", "-39.000015 0.000000 0.000000" );
SpawnObject( "Land_Mil_Tent_Big2_3", "5104.423340 11.342258 2291.169678", "53.500000 -1.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks_Round", "5249.127930 10.481742 2209.151123", "45.500008 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks_Round", "5254.177246 10.473411 2203.993408", "45.500008 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks_Round", "5259.167480 10.441424 2198.962891", "45.500008 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "4884.250000 10.868803 2512.661621", "-36.000004 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "4877.902832 10.868367 2521.514160", "-36.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks2", "4871.692871 10.874314 2529.923584", "-36.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks3", "4871.189941 11.702825 2555.600586", "-36.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks6", "5146.193359 9.500000 2238.163086", "-127.500000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks6", "4852.410156 9.908230 2501.815674", "-125.999992 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks6", "4830.246094 10.615182 2532.390869", "-126.000000 0.000000 0.000000" );
SpawnObject( "Land_Mil_Barracks6", "4838.041016 9.581349 2564.797119", "-36.000328 0.000000 0.000000" );
SpawnObject( "Wreck_Mi8", "4850.509277 11.557278 2545.774170", "0.000000 0.000000 0.000000" );
SpawnObject( "Wreck_UH1Y", "4866.316406 11.688688 2613.090088", "0.000000 0.000000 0.000000" );
SpawnObject( "Wreck_UH1Y", "5031.854980 11.386922 2357.967041", "0.000000 0.000000 0.000000" );
SpawnObject( "Wreck_UH1Y", "5150.084473 19.146156 2239.720215", "-74.000000 0.000000 0.000000" );
}
{
//INIT WEATHER BEFORE ECONOMY INIT------------------------
Weather weather = g_Game.GetWeather();
weather.MissionWeather(false); // false = use weather controller from Weather.c
weather.GetOvercast().Set( Math.RandomFloatInclusive(0.4, 0.6), 1, 0);
weather.GetRain().Set( 0, 0, 1);
weather.GetFog().Set( Math.RandomFloatInclusive(0.05, 0.1), 1, 0);
//INIT ECONOMY--------------------------------------
Hive ce = CreateHive();
if ( ce )
ce.InitOffline();
//DATE RESET AFTER ECONOMY INIT-------------------------
int year, month, day, hour, minute;
int reset_month = 9, reset_day = 20;
GetGame().GetWorld().GetDate(year, month, day, hour, minute);
if ((month == reset_month) && (day < reset_day))
{
GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
}
else
{
if ((month == reset_month + 1) && (day > reset_day))
{
GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
}
else
{
if ((month < reset_month) || (month > reset_month + 1))
{
GetGame().GetWorld().SetDate(year, reset_month, reset_day, hour, minute);
}
}
}
}
class CustomMission: MissionServer
{
void SetRandomHealth(EntityAI itemEnt)
{
if ( itemEnt )
{
int rndHlt = Math.RandomInt(55,100);
itemEnt.SetHealth("","",rndHlt);
}
}
override PlayerBase CreateCharacter(PlayerIdentity identity, vector pos, ParamsReadContext ctx, string characterName)
{
Entity playerEnt;
playerEnt = GetGame().CreatePlayer(identity, characterName, pos, 0, "NONE");//Creates random player
Class.CastTo(m_player, playerEnt);
GetGame().SelectPlayer(identity, m_player);
return m_player;
}
override void StartingEquipSetup(PlayerBase player, bool clothesChosen)
{
EntityAI itemTop;
EntityAI itemEnt;
ItemBase itemBs;
float rand;
itemTop = player.FindAttachmentBySlotName("Body");
if ( itemTop )
{
itemEnt = itemTop.GetInventory().CreateInInventory("Rag");
if ( Class.CastTo(itemBs, itemEnt ) )
itemBs.SetQuantity(4);
SetRandomHealth(itemEnt);
itemEnt = itemTop.GetInventory().CreateInInventory("Rag");
SetRandomHealth(itemEnt);
rand = Math.RandomFloatInclusive(0.0, 1.0);
if ( rand < 0.35 )
itemEnt = player.GetInventory().CreateInInventory("Apple");
else if ( rand > 0.65 )
itemEnt = player.GetInventory().CreateInInventory("Pear");
else
itemEnt = player.GetInventory().CreateInInventory("Plum");
SetRandomHealth(itemEnt);
}
}
};
Mission CreateCustomMission(string path)
{
return new CustomMission();
}
Alles anzeigen
Es wäre super, wenn mir jemand dabei helfen könnte!
Kommen wir zu Frage 2:
Kann ich Bereiche auf der Karte farblich markieren? Nehmen wir an, Balota wäre eine PVE Zone. Kann ich den Bereich auf der Karte mit einem Kreis farblich abheben, sodass jeder die Zone sofort erkennen kann, wenn er die Karte öffnet?
Besonders Geil wäre es, wenn man diese auch noch in eine SafeZone verwandeln könnte! Einen Beitrag dazu habe ich bereits gefunden, allerdings scheint der nicht mehr aktuell zu sein.
Vielleicht weiß ja auch hier jemand etwas dazu!
Ich bedanke mich schon mal ganz herzlich im Voraus und wünsche einen angenehmen Tag und ein schönes Lootreiches Wochenende
Viele Grüße