Jump to content

Adding another code to if(hasInterface)


READTHESCROLL

Recommended Posts

Trying to get Simple Epoch Missions and a status bar to work after completely reinstalling and wiping the DB for Epoch 304. I am not sure how to properly add multiple lines to the if(hasInterface). This is probably wrong but this what I have..

 

if(hasInterface)then{execVM "semClient.sqf"; "addons\Status_Bar\init_statusBar.sqf";}

 

I've tried a couple different variations but none of them have worked so far. Thanks for reading.

Link to comment
Share on other sites

First why did you wipe the db? Never read something abou that.

 

To your question. Use it like that:

if(hasInterface) then {
[] execVM "wai\remote.sqf";
[] execVM "addons\service_point\service_point.sqf";
[] execVM "addons\halo\halo_out.sqf";
[] execVM "addons\paintshop\paintshop.sqf";
};

Link to comment
Share on other sites

https://community.bistudio.com/wiki/Code_Optimisation

@Richie

Your code will throw an error (missing ;) at «...face)#{[]exec...»

if(hasInterface)then{execVM "file.sqf"};
 

@axeman

I rather have some readable code that uses a few kb more in the mission file (optimizing scripts for file size in a mod is pointless anyway), than having a stupid "optimized" one line code that no one can read and possibly learn of, adapt it, edit it or use the code elsewhere in his own script.

So please get rid of that code optimizer, especially for scripts inside the mod pbos, seriously!.

Link to comment
Share on other sites

I program in several languages as a hobby and for work at times. Code maintainability is SO important and formatting goes a long way towards understanding.

 

The main reason I figured I'd learn SQF is because many of the addons posted here didn't work in our environment. Mainly due to Linux and it's case sensitivity. Maybe, as a community we can come up with a coding standard, that way as we share bits and pieces it's not as hard to unwind what's going on.

 

In fact almost all changes are published at https://github.com/ekinnee/MuppetParty-EPOCH

Link to comment
Share on other sites

Since our testing on Linux, I believe we've been much more aware of the case sensitivity requirement, at least under that environment.

 

Standards are always good, getting everyone to follow them :) am probably equally guilty as some days code just pours out, you gotta get it down when that happens and inevitably it goes into testing with the good intention of tidying it up later..

Link to comment
Share on other sites

Since our testing on Linux, I believe we've been much more aware of the case sensitivity requirement, at least under that environment.

 

Standards are always good, getting everyone to follow them :) am probably equally guilty as some days code just pours out, you gotta get it down when that happens and inevitably it goes into testing with the good intention of tidying it up later..

 

I'm an avid Linux user, but there's times when it's still more effort than it's "worth". Also thank the deity of your choice that I had a Server 2012 key laying around.

Link to comment
Share on other sites

Kilo, you'll be pleased to read the latest changelog:

[Info] Server pbo is no longer obfuscated.

Loving the new info but is this 0.3.1 or 0.3.0.4

Cause e here is the latest change log info provided to us

[Added] Support for Esseker map.

[Added] Support for Takistan and loot positions for more AiA TP buildings.

[Added] Support for Australia Terrain Thanks to the communites of http://uk-gaming-zone.co.uk/, http://thewild.zone, http://www.utomnia.com/

[Added] More loot positions for AiA TP buildings and updates to existing positions to add pallets and freezers.

[Added] Female characters now have uniform storage once again.

[Added] Server side config for max player Krypto limits.

[Added] Environmental loot checks recoded and now allow for config via description.ext.

[Added] Drone spawn chances reduced.

[Added] Client spawning Sapper and Drone chance can now be controlled via description.ext.

[Added] Server side version check added to CfgEpochClient.

[Changed] Reduce payouts on scrap metal farming.

[Changed] Disabled Vehicle Simulation Handler by default as it does not seem to be needed anymore. re-enable vehicle simulation handler with simulationHandler = true in epochconfig.hpp.

[Changed] lower primary weapon spawn chances.

[Changed] Lower Krypto value for metal salvage and scraps.

[Changed] Disable moving traders by default again (Needs recoding in fsm)

[Changed] Increased weight of Cinder Blocks and Mortar Buckets.

[Changed] Revert workaround for 1.46 crash fix requires 1.46 build 131265 or higher.

[Changed] telepos array now uses modelToWorld offsets instead of world space positions.

[Changed] Increased delay between antagonist spawns to 10 minutes.

[Fixed] Increase range on proximity checks for gear should help with loot target issues.

[Fixed] Krypto device will now only drop if player actually had Krypto.

[Fixed] Added missing backpack B_AssaultPack_blk to loot table and pricing.

[Fixed] Teleport issues on Stratis or any other map with one or less teleport pad.

[Fixed] Added prevention of using tactical view.

[Fixed] Unable to sell new 762x54 150Rnd ammo box.

[Fixed] Energy, krypto stats shown and mouse auto centers once again when opening inventory.

[Fixed] Recoil_default error on first use of hatchet.

[Fixed] Weight added to SR-25 and L85A2 rifles.

[Fixed] Lower base armor on characters to Arma defaults, should fix issues with damage reporting.

[info] Updated windows command line example to show usage of -serverMod

[info] Updated description.ext and mission pbo's for new cultist configs.

WIP:

[Changed] Helicopter air drop event code disabled by default as it needs more work.

[Fixed] Cultist should now spawn correctly and also has a totally reworked code structure.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...