GolovaRaoul 221 Report post Posted April 22, 2017 Hello, I'm trying to make a new type of event based on the existing SupplyBox event, which is located in @Exile_Server_Config So I added this to config.cpp in @Exile_Server_Config Spoiler class gearcrate { /* Drops a supply box on a parachute next to a random airport on the map. The box may contain items. The box can be transported to a territory and installed to become a normal storage container. */ type = "spawn"; function = "ExileServer_system_event_gearcrate_start"; minTime = 1; // minutes maxTime = 1; // minutes minimumPlayersOnline = 0; dropRadius = 500; // 500m around an airport (including the main airport on Altis!) dropAltitude = 0; // altitude of the drop markerTime = 5; // minutes /* These are different types of boxes can be dropped. You can specify the cargo a box should contain. The type of box is chosen randomly from the following list. Add a type multiple times to increase the chance of being used. */ types[] = {"KSVK", "Lynx", "WoodSupplies", "Mk48", "L115A3", "ConcreteBuildingSupplies", "Explosives", "Grinding", "BreachingCharge", "Stinger", "Money", "Medical"}; class BoxTypes I activate the event in enabledEvents, and I copied/pasted ExileServer_system_event_supplyBox_start to fit my needs. I renamed this to ExileServer_system_event_gearcrate_start and packed it in @ExileServer. Now, I'm triggering the event every minute for testing purposes. But I get this error in my RPT, and it seems to me like the ExileServer can't find the file? I doublechecked it's in the code folder in @ExileServer packed PBO. Spoiler 17:28:10 Error in expression <ExileServer_system_event_gearcrate_start> 17:28:10 Error position: <ExileServer_system_event_gearcrate_start> 17:28:10 Error Undefined variable in expression: ExileServer_system_event_gearcrate_start 17:28:10 "ExileServer - Spawning ExileServer_system_event_gearcrate_start..." 17:28:10 Error in expression <on] call ExileServer_util_log; [] spawn _functionCode; } else { format ["Callin> 17:28:10 Error position: <_functionCode; } else { format ["Callin> 17:28:10 Error Undefined variable in expression: _functioncode 17:28:10 File exile_server\code\ExileServer_system_event_thread_spawn.sqf, line 32 What am I missing? A config somewhere or...? Thanks for helping me out GolovaRaoul 1 Share this post Link to post Share on other sites
red_ned 649 Report post Posted April 23, 2017 (edited) 23 hours ago, GolovaRaoul said: Hello, I'm trying to make a new type of event based on the existing SupplyBox event, which is located in @Exile_Server_Config So I added this to config.cpp in @Exile_Server_Config Hide contents class gearcrate { /* Drops a supply box on a parachute next to a random airport on the map. The box may contain items. The box can be transported to a territory and installed to become a normal storage container. */ type = "spawn"; function = "ExileServer_system_event_gearcrate_start"; minTime = 1; // minutes maxTime = 1; // minutes minimumPlayersOnline = 0; dropRadius = 500; // 500m around an airport (including the main airport on Altis!) dropAltitude = 0; // altitude of the drop markerTime = 5; // minutes /* These are different types of boxes can be dropped. You can specify the cargo a box should contain. The type of box is chosen randomly from the following list. Add a type multiple times to increase the chance of being used. */ types[] = {"KSVK", "Lynx", "WoodSupplies", "Mk48", "L115A3", "ConcreteBuildingSupplies", "Explosives", "Grinding", "BreachingCharge", "Stinger", "Money", "Medical"}; class BoxTypes I activate the event in enabledEvents, and I copied/pasted ExileServer_system_event_supplyBox_start to fit my needs. I renamed this to ExileServer_system_event_gearcrate_start and packed it in @ExileServer. Now, I'm triggering the event every minute for testing purposes. But I get this error in my RPT, and it seems to me like the ExileServer can't find the file? I doublechecked it's in the code folder in @ExileServer packed PBO. Hide contents 17:28:10 Error in expression <ExileServer_system_event_gearcrate_start> 17:28:10 Error position: <ExileServer_system_event_gearcrate_start> 17:28:10 Error Undefined variable in expression: ExileServer_system_event_gearcrate_start 17:28:10 "ExileServer - Spawning ExileServer_system_event_gearcrate_start..." 17:28:10 Error in expression <on] call ExileServer_util_log; [] spawn _functionCode; } else { format ["Callin> 17:28:10 Error position: <_functionCode; } else { format ["Callin> 17:28:10 Error Undefined variable in expression: _functioncode 17:28:10 File exile_server\code\ExileServer_system_event_thread_spawn.sqf, line 32 What am I missing? A config somewhere or...? Thanks for helping me out GolovaRaoul 1st thing is all local variables for missions etc should always start with an underscore but I am no expert on server config driven missions. I would brand your global variables like gearcrate to GRgearcrate and then any local variables in the script function becomes _function Edited April 23, 2017 by red_ned Share this post Link to post Share on other sites
Mezo 1264 Report post Posted April 25, 2017 ^ No idea what he's talking 'bout open up bootstrap/fn_preinit in exile_server and add your new function name and it's path to the init. 1 Share this post Link to post Share on other sites
GolovaRaoul 221 Report post Posted April 25, 2017 23 minutes ago, Mezo said: ^ No idea what he's talking 'bout open up bootstrap/fn_preinit in exile_server and add your new function name and it's path to the init. Thanks, works perfectly now Share this post Link to post Share on other sites
NeverAgain 81 Report post Posted April 25, 2017 @GolovaRaoul Update on this page?I need this.Good work !!! Share this post Link to post Share on other sites
GolovaRaoul 221 Report post Posted April 26, 2017 17 hours ago, NeverAgain said: @GolovaRaoul Update on this page?I need this.Good work !!! It's actually pretty simple. Just copy/paste the excisting SupplyDrop event, rename it a bit and voila. Don't forget to activate the event and do as Mezo said ^^ 1 Share this post Link to post Share on other sites
M6mal 40 Report post Posted July 8, 2017 i am using malden and the supplybox only drops on the top left island airport, i have a trader at top of airport on mainland and thats why it does not drop there, is there any way i can override this so i get a drop incoming Share this post Link to post Share on other sites
GolovaRaoul 221 Report post Posted July 9, 2017 22 hours ago, M6mal said: i am using malden and the supplybox only drops on the top left island airport, i have a trader at top of airport on mainland and thats why it does not drop there, is there any way i can override this so i get a drop incoming You can overwrite it. I don't know the variable names out of my head (RIP English), but if you open up the code located in @ExileServer\code, you will find the file located in there. In that file, there's something like _airportPositions. You can comment that out, and make an array of locations where your Airports should be. So it will look a bit like this: // _airportPosistions = call exilefunction find airport bla bla bla _airportPositions = [[2000,2000,0],[3500,5000,0]] Hope this will help you out a bit. 1 Share this post Link to post Share on other sites
M6mal 40 Report post Posted July 11, 2017 ExileServer_system_event_supplyBox_start.sqf Share this post Link to post Share on other sites