blckeagls 12 Posted February 16, 2015 (edited) Hello all... I am trying to get objects to spawn in on the map before mission starts.. So I have a script (fn_init.sqf) that does this and is called by: class CfgPatches { class A3ResourceWarServer { units[] = {}; weapons[] = {}; requiredAddons[] = {"CustomItems","DarkCinderBlock","Flooring","GarageDoor","LightCinderBlock","MediumCinderBlock","WoodStairs"}; }; }; class CfgFunctions { class inf1 { class main1 { file = "\resourcewarserver"; class init { preInit = 1; }; }; }; }; My problem is: once the preinit is completed... it restarts the server and reloads it again. The mission never starts just keeps restarting.. Mission starts with postinit.... But it spawns the vehicles after mission start. Here is my server RPT: ===================================================================== 11:52:13 Initializing Steam server - Game Port: 2320, Steam Query Port: 2321 11:52:14 Mission ResourceWar.Altis: 'description.ext::Header::minPlayer' (0) is wrong 11:52:14 Starting mission: 11:52:14 Mission file: ResourceWar 11:52:14 Mission world: Altis 11:52:14 Mission directory: mpmissions\ResourceWar.Altis\ 11:52:32 Strange convex component08 in a3\structures_f_epb\civ\garbage\garbagecontainer_closed_f.p3d:geometryView 11:52:32 Strange convex component10 in a3\structures_f_epb\civ\garbage\garbagecontainer_closed_f.p3d:geometryView 11:52:32 Strange convex component145 in a3\plants_f\tree\t_pinuss2s_b_f.p3d:geometryView 11:52:32 Strange convex component149 in a3\plants_f\tree\t_pinuss2s_b_f.p3d:geometryView 11:52:34 Strange convex component01 in a3\structures_f_epc\civ\accessories\beachbooth_01_f.p3d:geometryView 11:52:34 Strange convex component02 in a3\structures_f_epc\civ\accessories\beachbooth_01_f.p3d:geometryView 11:52:34 Strange convex component03 in a3\structures_f_epc\civ\accessories\beachbooth_01_f.p3d:geometryView 11:52:34 Strange convex component04 in a3\structures_f_epc\civ\accessories\beachbooth_01_f.p3d:geometryView 11:52:46 Attempt to override final function - bis_functions_list 11:52:46 Attempt to override final function - bis_functions_listpreinit 11:52:46 Attempt to override final function - bis_functions_listpostinit 11:52:46 Attempt to override final function - bis_functions_listrecompile 11:52:47 Attempt to override final function - bis_fnc_missiontaskslocal 11:52:47 Attempt to override final function - bis_fnc_missionconversationslocal 11:52:47 Attempt to override final function - bis_fnc_missionflow 11:52:47 "fn_init Started @ 18431" 11:52:47 "Spawn Vehicles Started @ 18431" 11:52:48 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. customitems ...(continues) 11:52:52 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. foundation ...(continues) 11:52:52 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. foundation 11:52:52 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. flooring ...(continues) 11:52:53 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. darkcinderblock 11:52:53 Too detailed shadow lod in darkcinderblock\cinderblockwall.p3d (0:0.000000 : 2592) - shadows disabled 11:52:53 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. mediumcinderblock 11:52:53 Too detailed shadow lod in mediumcinderblock\cinderblockwall.p3d (0:0.000000 : 2592) - shadows disabled 11:52:53 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. mediumcinderblock ...(continues) 11:52:54 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. lightcinderblock 11:52:54 Too detailed shadow lod in lightcinderblock\cinderblockwall.p3d (0:0.000000 : 2592) - shadows disabled 11:52:54 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. lightcinderblock 11:52:54 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. lightcinderblock 11:52:54 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. lightcinderblock 11:52:54 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. lightcinderblock 11:52:55 Too detailed shadow lod in lightcinderblock\cinderblockwall_window.p3d (0:0.000000 : 2376) - shadows disabled 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. darkcinderblock 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. darkcinderblock 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. darkcinderblock 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. darkcinderblock 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. darkcinderblock 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. darkcinderblock 11:52:55 Too detailed shadow lod in darkcinderblock\cinderblockwall_door.p3d (0:0.000000 : 2334) - shadows disabled 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. darkcinderblock 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. darkcinderblock 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. darkcinderblock 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. darkcinderblock 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. darkcinderblock 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. darkcinderblock 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. flooring 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. flooring 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. flooring 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. flooring 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. flooring 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. darkcinderblock 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. flooring 11:52:55 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. flooring 11:52:56 Warning Message: You cannot play/edit this mission; it is dependent on downloadable content that has been deleted. flooring ...(continues) 11:53:10 "Spawn Vehicles Completed @ 18434" 11:53:10 "fn_init.sqf completed @ 18434" 11:53:14 c:\w\stable\futura\lib\network\networkserver.cpp ClearNetServer:NOT IMPLEMENTED - briefing! 11:53:15 Extensions: 11:53:15 Arma2Net.Unmanaged (C:\Arma3\@A3ResourceWarServer\Arma2Net.Unmanaged.dll) ---------- Post added at 20:08 ---------- Previous post was at 20:00 ---------- It stops working here in there fn_init.sqf (call compilefinal preprocessfilelinenumbers "\resourcewarserver\StartServer\SpawnVehicles.sqf";) Here in the: SpawnVehicles.sqf: (_x select 0) call ServerCreateObject; ServerCreateObject: private ["_vehicleID","_vehInfo","_className","_ownerID","_position","_damage","_hitPoints","_resources","_veh","_weaponCargo","_magazineCargo","_count","_i","_backpackCargo","_Bldgbank","_Bldgpitch","_Bldgyaw"]; _vehicleID = _this; _vehInfo = _vehicleID call DB_GetObject; ////diag_log format["_vehInfo: %1",_vehInfo]; _className = _vehInfo select 0; _ownerID = _vehInfo select 1; _position = call compile (_vehInfo select 2); _damage = parseNumber (_vehInfo select 3); _Direction = call compile (_vehInfo select 4); _VectorDir = call compile (_vehInfo select 5); _VectorUp = call compile (_vehInfo select 6); _resources = call compile (_vehInfo select 7); _veh = _className createVehicle _position; _veh setPosWorld _position; ////diag_log format["_position: %1",_position]; _Bldgpitch = parseNumber (_vehInfo select 8); _Bldgbank = parseNumber (_vehInfo select 9); _Bldgyaw = parseNumber (_vehInfo select 10); _lastDate = _vehInfo select 11; _veh setVariable ["Bldgpitch",_Bldgpitch,true]; _veh setVariable ["Bldgbank",_Bldgbank,true]; _veh setVariable ["Bldgyaw",_Bldgyaw,true]; //_veh setDir _Direction; //_veh setVectorDir _VectorDir; //_veh setVectorUp _VectorUp; [_veh,[_Bldgpitch, _Bldgbank, _Bldgyaw]] call SetPitchBankYaw; ////diag_log format["ServerCreateObject -- Spawned Object %1 located @ %2",_className,_position]; clearMagazineCargoGlobal _veh; clearBackpackCargoGlobal _veh; clearWeaponCargoGlobal _veh; clearItemCargoGlobal _veh; _veh setVariable ["ObjectID",_vehicleID,true]; //diag_log format["ObjectID: %1",_vehicleID]; _veh setVariable ["OwnerID",_ownerID,true]; //diag_log format["_OwnerID: %1",_ownerID]; _veh setDamage _damage; [_veh,_resources] call SetResouceValues; //Add Weap Inv _weaponCargo = _vehicleID call DB_GetObjectWeaponInventory; ////diag_log format["ServerCreateVehicle -- _weaponCargo: %1 -- count: %2",_weaponCargo, (count (_weaponCargo select 0))]; if ((typeName _weaponCargo) == "ARRAY" && (count (_weaponCargo select 0) > 0)) then { _i = 0; _count = _weaponCargo select 1; { _veh addWeaponCargoGlobal [_x,_count select _i]; ////diag_log format["Added: %1 x %2 to vehicle",_x,_count select _i]; _i = _i + 1; } foreach (_weaponCargo select 0); }; //Add Mag Inv _magazineCargo = _vehicleID call DB_GetObjectMagazineInventory; ////diag_log format["ServerCreateVehicle -- _magazineCargo: %1 -- count: %2",_magazineCargo, (count (_magazineCargo select 0))]; if ((typeName _magazineCargo) == "ARRAY" && (count (_magazineCargo select 0) > 0)) then { _i = 0; _count = _magazineCargo select 1; { _veh addMagazineCargoGlobal [_x,_count select _i]; //diag_log format["Added: %1 x %2 to vehicle",_x,_count select _i]; _i = _i + 1; } foreach (_magazineCargo select 0); }; //Add backpack Inv _backpackCargo = _vehicleID call DB_GetObjectBackpackInventory; ////diag_log format["ServerCreateVehicle -- _backpackCargo: %1 -- count: %2",_backpackCargo, (count (_backpackCargo select 0))]; if ((typeName _backpackCargo) == "ARRAY" && (count (_backpackCargo select 0) > 0)) then { _i = 0; _count = _backpackCargo select 1; { _veh addBackpackCargoGlobal [_x,_count select _i]; ////diag_log format["Added: %1 x %2 to vehicle",_x,_count select _i]; _i = _i + 1; } foreach (_backpackCargo select 0); }; //Add Item Inv _itemCargo = _vehicleID call DB_GetObjectItemInventory; ////diag_log format["ServerCreateVehicle -- _itemCargo: %1 -- count: %2",_itemCargo, (count (_itemCargo select 0))]; if ((typeName _itemCargo) == "ARRAY" && (count (_itemCargo select 0) > 0)) then { _i = 0; _count = _itemCargo select 1; { _veh addItemCargoGlobal [_x,_count select _i]; ////diag_log format["Added: %1 x %2 to vehicle",_x,_count select _i]; _i = _i + 1; } foreach (_itemCargo select 0); }; _veh call ObjectAddEventHandlers; _veh setVariable ["LastDate",_lastDate,true]; Note: This works: (_x select 0) spawn ServerCreateObject; This does not work: (_x select 0) call ServerCreateObject; Edited February 16, 2015 by blckeagls Share this post Link to post Share on other sites