Jump to content

alleycat

Member
  • Content Count

    1003
  • Joined

  • Last visited

  • Medals

  • Medals

Everything posted by alleycat

  1. Thanks for the answer. Some questions though: 1. The reason I want to clone an existing soldier is because I want to have a default guy with default loadout without having to mess with equipment and JIP while scripting. 2. What is a bisign and what are these for? 3. When I want to create new objects/units this way, can I do that with just pbo extraction and cloning without having to install the whole editing suite and unpacking all the addons and having a virtual drive? The goal is to create new items like the evidence things that have no special behaviour, except new 3d model and inventory image.
  2. Actuall the problem was that the "export to multiplayer" option was broken. It never copied the updated map to the mp folder until I rebooted the game. I noticed this when joining a dedicated server as the first player, when pressing ready in briefing it appears to delay for a few seconds before the game actually starts. Is that the server waiting to process the init. sqf before letting players in?
  3. alleycat

    Arma2MySQL

    I was using the explorer all the time next to the actual missions. This is what I did in a custom mission: > Arma2NETMySQLCommand ['weaponslite', 'SELECT var FROM testtable WHERE var=200'] throw "System.Reflection.TargetInvocationException" var is a custom field in testtable with a value of 200 which I manually entered into the db. 02/01/2013 16:45:11 Caught exception of type System.Reflection.TargetInvocationException 02/01/2013 16:45:11 System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> [u]System.IO.FileLoadException: Die Datei oder Assembly "System.Data.SQLite, Version=1.0.81.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" oder eine Abhängigkeit davon wurde nicht gefunden. Die gefundene Manifestdefinition der Assembly stimmt nicht mit dem Assemblyverweis überein. (Ausnahme von HRESULT: 0x80131040)[/u] bei Arma2NETMySQLPlugin.SQLite.OpenConnection(String databasename) bei Arma2NETMySQLPlugin.DatabaseObject..ctor(String[] values) bei Arma2NETMySQLPlugin.Databases..ctor() bei Arma2NETMySQLPlugin.Startup.StartupConnection() bei Arma2NETMySQLPlugin.Arma2NETMySQLPluginCommand.Invoke(String args, Int32 maxResultSize) bei Arma2Net.Managed.AddInManager.DomainInvokeAddIn(AddInArguments args) --- Ende der internen Ausnahmestapelüberwachung --- bei System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) bei System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) bei System.Delegate.DynamicInvokeImpl(Object[] args) bei Arma2Net.Managed.AddInManager.DomainDoCallback() bei System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate) bei Arma2Net.Managed.AddInManager.DoCallbackImpl(AppDomain domain, Delegate func, Object arg) bei Arma2Net.Managed.AddInManager.DoCallbackWithResult[T,TResult](AppDomain domain, Func`2 func, T arg) bei Arma2Net.Managed.AddInManager.InvokeAddIn(String addInName, String arguments, Int32 maxResultSize) bei Arma2Net.Managed.Bridge.InvokeBuiltInOrAddIn(String function, Int32 maxResultSize) bei Arma2Net.Managed.Bridge.InvokeFunction(String function, Int32 maxResultSize) 02/01/2013 16:45:11 function: Arma2NETMySQLCommand ['weaponslite', 'SELECT var FROM habeeb WHERE var=200'] 02/01/2013 16:45:11 maxResultSize: 4095 The only thing I can think of that might be a problem is the version of the dll files. The SQLite site does not list 1.0.81.0, I am running 84. Going to track down a 1.0.81.0 download and report back. ---------- Post added at 05:29 PM ---------- Previous post was at 04:57 PM ---------- Found a 081 dll and now it appears to work in the explorer but not ingame: The db has a separate table which has 2 columns(var and var2). I gave the first row a value of (200/250). Then I called in the explorer: > Arma2NETMySQLCommand ['weaponslite', 'SELECT var2 FROM testtable WHERE var=200'] [[["250"]]] Info: 17:08:51 - Received - Database: weaponslite SQL Query: SELECT var2 FROM habeeb WHERE var=200 Which is teh correct value. However calling this from a scrip ingame: Info: 17:15:05 - Logging started in directory: C:\Users\Administrator\AppData\Local\Arma2NETMySQL/logs/ Info: 17:15:05 - Arma2NETMySQL Plugin Started. Info: 17:15:05 - Version number: 0.1.0.0 Info: 17:15:05 - Loading databases... Info: 17:15:05 - Databases.txt file loading in from: C:\Users\Administrator\AppData\Local\Arma2NETMySQL/Databases.txt Info: 17:15:05 - Type: sqlite Database: weaponslite Info: 17:15:05 - SQLite folder location: C:\Users\Administrator\AppData\Local\Arma2NETMySQL/sqlite/ Error: 17:15:05 - The number and/or format of the arguments passed in doesn't match. _selectTest = "Arma2Net.Unmanaged" callExtension "Arma2NETMySQLCommand ['weaponslite', 'SELECT var2 FROM testtable WHERE var=200']"; hint format ["habeeb is %1.", _selectTest]; Could formatting be an issue? Perhaps the 250 is coming in correctly but the formatting that should display it breaks it?
  4. alleycat

    Arma2MySQL

    System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.IO.FileNotFoundException: Die Datei oder Assembly "System.Data.SQLite, Version=1.0.81.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden. Similar issue with SQLite, perhaps that different version number is causing the problem. I made a test mission and added a custom new column to the database to see if that would work. column name was testcol. default value was 5600. Init.sqf "Arma2Net.Unmanaged" callExtension "Arma2NETMySQLCommand"; player addAction ["testcol", "testcol.sqf"]; testcol.sqf _selectTest = "Arma2Net.Unmanaged" callExtension "Arma2NETMySQLCommand ['weaponslite', 'SELECT testcol FROM users']"; hint format ["testcol is %1.", _selectTest]; This should return 5600 on a dabase with no entries? I am a SQL newb so I am not sure. But it never returns anything. Just nothing, no error ingame. from what I understand the sql command I typed grabs the whole testcol column the log: In case I messed up SQL code, can you suggest a quick simple command that would grab data from a column? I basically do this test because I suspect something might have gone wrong when importing that .sql file in the example mission. That is why I would like to test the plugin setup by grabbing a variable in the most simple way to see if the connection works. ---------- Post added at 04:03 AM ---------- Previous post was at 02:14 AM ---------- Found the dlls used for SQlite and dropped them in the 3 folders. Now the error is narrowed down to: Which is probably my messing up the SQL syntax in the custom mission I made.But that loadout mission still never even attempts to connect, not even an error. What is the correct syntax to return the id from the first row? Also, when installing the MSSQL binaries, all is needed is to run installer.exe with -confirm true?
  5. alleycat

    Arma2MySQL

    The Connector is already installed. The problem appears to be that the registry entries are in a different folder for x64 systems. Could it be that newer versions of the programs needed broke something on the sql plugin? The connector version that it was tested for was 6.5.4, while the download available is 6.6.4. (and the oldest available on teh site is 6.6.5.) The error message specifically looks for: 01/31/2013 03:47:07 System.Reflection.TargetInvocationException: Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.IO.FileNotFoundException: Die Datei oder Assembly "MySql.Data, Version=6.5.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden. Ill try to find a 6.5.4 installer and report back EDIT------------------------------------------------------------------------------------------ ---------- Post added at 04:27 AM ---------- Previous post was at 03:44 AM ---------- 01/31/2013 04:15:50 Caught exception of type System.Reflection.TargetInvocationException 01/31/2013 04:15:50 System.Reflection.TargetInvocationException: [u]Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.ArgumentException: Der Wert liegt außerhalb des erwarteten Bereichs.[/u] bei Arma2NETMySQLPlugin.Arma2NETMySQLPlugin.Invoke(String args, Int32 maxResultSize) bei Arma2Net.Managed.AddInManager.DomainInvokeAddIn(AddInArguments args) --- Ende der internen Ausnahmestapelüberwachung --- bei System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) bei System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) bei System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) bei System.Delegate.DynamicInvokeImpl(Object[] args) bei Arma2Net.Managed.AddInManager.DomainDoCallback() bei System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate) bei Arma2Net.Managed.AddInManager.DoCallbackImpl(AppDomain domain, Delegate func, Object arg) bei Arma2Net.Managed.AddInManager.DoCallbackWithResult[T,TResult](AppDomain domain, Func`2 func, T arg) bei Arma2Net.Managed.AddInManager.InvokeAddIn(String addInName, String arguments, Int32 maxResultSize) bei Arma2Net.Managed.Bridge.InvokeBuiltInOrAddIn(String function, Int32 maxResultSize) bei Arma2Net.Managed.Bridge.InvokeFunction(String function, Int32 maxResultSize) 01/31/2013 04:15:50 function: Arma2NETMySQL 01/31/2013 04:15:50 maxResultSize: 4095 Ein Aufrufziel hat einen Ausnahmefehler verursacht. ---> System.ArgumentException: Der Wert liegt außerhalb des erwarteten Bereichs. This is german, translated it means: "Target has caused an exception error > Value out of expected range Mysqlplugin log: Error: 04:15:50 - The number and/or format of the arguments passed in doesn't match. All of this happens when typing this into the arma2NET explorer: > Arma2NETMySQL throw "System.Reflection.TargetInvocationException" The good news: After installing the old 6.5.4 connector and rebooting (and putting all the dlls into the 3 folders: OA root, the plugin dll directory and @arma2net) the missing dll error disappeared. But now this value out of range stuff is happening. And the box with the loadout is still missing in the example mission
  6. alleycat

    Arma2MySQL

    Reinstalled the 4.0 NEZ framework, and rebooted. Still wont work. http://stackoverflow.com/questions/9035977/system-data-sqlite-windows-x64-install-fails-could-not-load-file-or-assembly-or this is the exact error I am having. And this: http://stackoverflow.com/questions/7164526/failed-to-read-key-hklm-software-microsoft-netframework-v4-0-30319-assemblyfold http://system.data.sqlite.org/index.html/info/d8491abd0b I am a bit scared of messing with regedit. The fixes they suggest, can they be safely applied without wrecking windows? ---------- Post added at 09:04 PM ---------- Previous post was at 08:18 PM ---------- On my server pc (winserver2008 R2 64bit) the key it is looking for "AppfoldersEx" resides in in Wow6432Node/. ---------- Post added at 09:27 PM ---------- Previous post was at 09:04 PM ---------- Tried using a normal SQL database, this time the error is relating to "MySql.Data", what dependencies are needed to fix that?
  7. alleycat

    Arma2MySQL

    The precompiled binaries throw errors that point to a missing VS2010 install. Does it actually need VS2010 to run? The errors ends with AssemblyfoldersEx. Some workarounds suggest fixing some reg keys but I do not want to mess with that so I ll install vs2010 and see if it works
  8. Shiny HALO script ->Easy to use ->comes with shiny altimeter that shows a colored warning if the altitude is too low ->Works in SP, MP Download: http://www.fileswap.com/dl/mv18lUy6v1/cat_halo_script.Takistan.rar.html
  9. alleycat

    Arma2NET

    Is it normal for the @Arma2Net folder to NOT appear in the ingame extension menu? (other mods like CBA do appear in there).
  10. alleycat

    Arma2MySQL

    Tried using SQLite database, and still it wont work. I think a problem on the DB side can be ruled out. Something is messed up with my plugin install. EDIT: Narrowed the problem down to a problem of wether to use OA game root folder or the appdata (the appdata folders have no file changes for days). Going to try to drop the whole folder structure in the OA root. EDIT2: Did not work. Going to retrace the plugin installation part again and see if I messed it up somewhere. EDIT3: HAS to be something with the modfolder loading Arma2NET. Tried it on my local pc too and what is weird is that the folder never appears in the ingame extension menu EDIT4: I think I am missing something completely obvious. Any example mission that needs ARMA2NET fails to work on my server pc and gaming pc EDIT5: Reinstalled the .NET profile, now Arma2NET is writing the log files, also the datetime mission works. However still no working SQL. Nothing in any SQL log. COuld it be that SQL based missions need time for their database calls to kick in or something? Version 1.62.95251 11:26:10 Mission Arma2NetMySQLPlugin-ExampleMis.utes: Missing 'description.ext::Header' 11:26:11 Server error: Player without identity cat (id 65834884) 11:26:23 Warning: looped for animation: ca\anims\characters\data\anim\sdr\mov\erc\wlk\non\non\amovpercmwlksnonwnondf.rtm differs (looped now 0)! MoveName: amovpercmstpsnonwnondnon_amovpercmstpsraswpstdnon 11:26:23 Warning: looped for animation: ca\anims\characters\data\anim\sdr\mov\erc\wlk\non\non\amovpercmwlksnonwnondf.rtm differs (looped now 1)! MoveName: amovpercmrunsnonwbindf_rfl 11:26:23 [3100,97.468,0,"XEH: PreInit Started. v1.0.0.189. MISSINIT: missionName=Arma2NetMySQLPlugin-ExampleMis, worldName=utes, isMultiplayer=true, isServer=true, isDedicated=true"] 11:26:25 [3100,99.375,0,"XEH: PreInit Finished. CACHE DISABLED? (Disable caching with cba_disable_cache.pbo): SLX_XEH_RECOMPILE=false, CBA_COMPILE_RECOMPILE=false, CBA_FUNC_RECOMPILE=false"] 11:26:26 [3101,99.68,0,"XEH: PostInit Started"] 11:26:26 [3101,99.753,0,"CBA_VERSIONING: cba=1.0.0.190, cba_a2=1.0.0.8, cba_oa=1.0.0.6, "] 11:26:26 [3101,99.79,0,"XEH: PostInit Finished. State: _isClient=false, _isJip=false, _isDedClient=false, _isServer=true, _isDedServer=true, _playerCheckDone=true, _sp=false, _startInitDone=true, _postInitDone=true, _mpRespawn=false, _machineType=0, _sessionId=1, _level=0, _timeOut=false, _game=1, BIS_functions=L 1-1-B:1, group=L 1-1-B"] 11:26:44 Mission Arma2NetMySQLPlugin-ExampleMis.utes: Missing 'description.ext::Header' ===================================================================== == C:\Program Files (x86)\Steam\steamapps\common\Arma 2 Operation Arrowhead\arma2oaserver.exe == "C:\Program Files (x86)\Steam\steamapps\common\Arma 2 Operation Arrowhead\arma2oaserver.exe" -port=2302 "-config=C:\Program Files (x86)\Steam\steamapps\common\Arma 2 Operation Arrowhead\TA2DST\cat_sql\TA2DST_config.cfg" "-cfg=C:\Program Files (x86)\Steam\steamapps\common\Arma 2 Operation Arrowhead\TA2DST\cat_sql\TA2DST_basic.cfg" "-profiles=C:\Program Files (x86)\Steam\steamapps\common\Arma 2 Operation Arrowhead\TA2DST\cat_sql" -name=TA2DST -netlog -pid=PID.log "-ranking=ranking.log" "-mod=Expansion\beta;Expansion\beta\Expansion;@CBA;@CBA_A2;@CBA_OA;@Arma2NET" ===================================================================== Exe timestamp: 2013/01/24 23:31:30 Current time: 2013/01/30 11:37:04 Version 1.62.95251 11:37:04 Mission Arma2NetMySQLPlugin-ExampleMis.utes: Missing 'description.ext::Header' 11:37:05 Server error: Player without identity cat (id 720118622) 11:37:18 Warning: looped for animation: ca\anims\characters\data\anim\sdr\mov\erc\wlk\non\non\amovpercmwlksnonwnondf.rtm differs (looped now 0)! MoveName: amovpercmstpsnonwnondnon_amovpercmstpsraswpstdnon 11:37:19 Warning: looped for animation: ca\anims\characters\data\anim\sdr\mov\erc\wlk\non\non\amovpercmwlksnonwnondf.rtm differs (looped now 1)! MoveName: amovpercmrunsnonwbindf_rfl 11:37:19 [6911,174.245,0,"XEH: PreInit Started. v1.0.0.189. MISSINIT: missionName=Arma2NetMySQLPlugin-ExampleMis, worldName=utes, isMultiplayer=true, isServer=true, isDedicated=true"] 11:37:22 [6911,176.777,0,"XEH: PreInit Finished. CACHE DISABLED? (Disable caching with cba_disable_cache.pbo): SLX_XEH_RECOMPILE=false, CBA_COMPILE_RECOMPILE=false, CBA_FUNC_RECOMPILE=false"] 11:37:22 [6912,177.172,0,"XEH: PostInit Started"] 11:37:23 [6912,177.31,0,"CBA_VERSIONING: cba=1.0.0.190, cba_a2=1.0.0.8, cba_oa=1.0.0.6, "] 11:37:23 [6912,177.368,0,"XEH: PostInit Finished. State: _isClient=false, _isJip=false, _isDedClient=false, _isServer=true, _isDedServer=true, _playerCheckDone=true, _sp=false, _startInitDone=true, _postInitDone=true, _mpRespawn=false, _machineType=0, _sessionId=1, _level=0, _timeOut=false, _game=1, BIS_functions=L 1-1-B:1, group=L 1-1-B"] EDIT6: Ok this is weird. This RPT log does not show anything interesting, except that at 11:34 there is an attempt to connect to the database: Info: 11:34:13 - Logging started in directory: C:\Users\Administrator\AppData\Local\Arma2NETMySQL/logs/ Info: 11:34:13 - Arma2NETMySQL Plugin Started. Info: 11:34:13 - Version number: 0.1.0.0 Info: 11:34:13 - Loading databases... Info: 11:34:13 - Databases.txt file loading in from: C:\Users\Administrator\AppData\Local\Arma2NETMySQL/Databases.txt Info: 11:34:13 - Type: sqlite Database: weaponslite There was no mission at that point, or I had a mission running for at least 8 minutes and the SQL started working, I can not remember and I was not so far able to reproduce the situation. EDIT7: Was able to reproduce the situation by typing into the arma2net explorer: > Arma2NETMySQLCommand throw "System.Reflection.TargetInvocationException" Info: 14:15:54 - Logging started in directory: C:\Users\Administrator\AppData\Local\Arma2NETMySQL/logs/ Info: 14:15:54 - Arma2NETMySQL Plugin Started. Info: 14:15:54 - Version number: 0.1.0.0 Info: 14:15:54 - Loading databases... Info: 14:15:54 - Databases.txt file loading in from: C:\Users\Administrator\AppData\Local\Arma2NETMySQL/Databases.txt Info: 14:15:54 - Type: sqlite Database: weaponslite 01/30/2013 14:15:54 Caught exception of type System.Reflection.TargetInvocationException 01/30/2013 14:15:54 System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> [u]System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SQLite, Version=1.0.81.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139' or one of its dependencies. Das System kann die angegebene Datei nicht finden.[/u] at Arma2NETMySQLPlugin.SQLite.OpenConnection(String databasename) at Arma2NETMySQLPlugin.DatabaseObject..ctor(String[] values) at Arma2NETMySQLPlugin.Databases..ctor() at Arma2NETMySQLPlugin.Startup.StartupConnection() at Arma2NETMySQLPlugin.Arma2NETMySQLPluginCommand.Invoke(String args, Int32 maxResultSize) at Arma2Net.Managed.AddInManager.DomainInvokeAddIn(AddInArguments args) --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[] args) at Arma2Net.Managed.AddInManager.DomainDoCallback() at System.AppDomain.DoCallBack(CrossAppDomainDelegate callBackDelegate) at Arma2Net.Managed.AddInManager.DoCallbackImpl(AppDomain domain, Delegate func, Object arg) at Arma2Net.Managed.AddInManager.DoCallbackWithResult[T,TResult](AppDomain domain, Func`2 func, T arg) at Arma2Net.Managed.AddInManager.InvokeAddIn(String addInName, String arguments, Int32 maxResultSize) at Arma2Net.Managed.Bridge.InvokeBuiltInOrAddIn(String function, Int32 maxResultSize) at Arma2Net.Managed.Bridge.InvokeFunction(String function, Int32 maxResultSize) 01/30/2013 14:15:54 function: Arma2NETMySQLCommand 01/30/2013 14:15:54 maxResultSize: 4095 Looks like some file is missing.
  11. Your code fixed the positioning, thanks. I dont get why. Now for the weird part, my approach placed all items at the perfect height but outside of buildings. Going to attempt to combine both methods and report back. EDIT: Both codes worked. The problem was the "can_collide". If it is not used the items spawn outside. If it is used, inside. But at a messed up height.
  12. What do you mean? Does this line cause the problem with my loot spawning outside? EDIT: It doesnt apparently. leaving it out spawns loot at the desired height, but still outside.
  13. alleycat

    Arma2MySQL

    This is how the privileges look on sqladmin thingy. cat_arma2 is the user that is listed in the databases.txt. I also deleted the leftover databases in my OA game folder as you suggested, retried and it would not work. As far as loading the mod folder goes, I think that is working, because the server is listed in the browser as having the @Arma2NET.. folder loaded. What I did was to click import on the sql admin tool and then selected the .sql file. Although had the an "arma2" database loaded and it even said "import sql into arma2 database" the new weapons database still ended up in the "root" area of the sql stuff. I wonder, if there is not even a log file being created, would that be an error of a faulty database setup or a problem with the plugin loading? I think it is the plugin side not working, because if the plugin worked it would leave some errors EDIT: Also what exactly is ARMA2NET? Your readme says: Do I have to install that too? (From what I read, it is needed to compile the plugin, but not to run it)
  14. Is there a list somewhere of these keywords?
  15. I came up with this: _c = 0; while { format ["%1", _x buildingPos _c] != "[0,0,0]" } do {_c = _c + 1}; hintsilent format ["The building has %1 positions", _c]; _spawnlocs = _c; while {_spawnlocs > 0} do { _loot = createVehicle ["WeaponHolder", (_x buildingpos _spawnlocs), [], 0, "CAN COLLIDE"]; //_loot = "WeaponHolder" createVehicle (_x buildingpos _spawnlocs); _loot addWeaponCargoGlobal ["MetisLauncher",1]; _loot setpos [getpos _loot select 0,getpos _loot select 1, 1]; _spawnlocs = _spawnlocs - 1 } It works but it has a weird problem: If I run this on smaller buildings all items are spawned outside. However in a large building like the hangar they spawn correctly. I think something is checking wether there is room for the object in the background.
  16. alleycat

    Arma2MySQL

    Going to retrace my install to check, I might have messed up at some point. The folders: C:\Users\Administrator\AppData\Local\Arma2NETMySQL +/logs and the databases.text is in there too. (in the sql root one) no box is spawned at all and the log file folder is empty. The databases entry: (pw and name removed obviously) mysql,arma2,127.0.0.1,3306,my_username,my_pw Plugin folder: C:\Program Files (x86)\Steam\steamapps\common\Arma 2 Operation Arrowhead\@Arma2NET\AddIns\Arma2NETMySQLPlugin I found out that I accidently skipped this step: Being an SQL newb I imported the sql file using "import", which created a new sql database in the root location called "weapons". So I adjusted the databases entry to: mysql,weapons,127.0.0.1,3306,my_username,my_pw and it still wont work (no logfiles, no box) Am I doing something wrong when importing that .sql?
  17. alleycat

    ArmA (MP) Scripting

    Am I doing this right as far as MP scripting is concerned: 1. I called a script from the init.sqf of the mission that attaches an addaction to every building on a specific type on the map. I did this all without any specific isServer checks. How does this play out on a dedicated server? Will it repeat itself for every client joining? 2. If I wanted something to only execute on the server, like the example above, does that still mean a client can use that addaction? 3. I have seen some missions use "server" subfolders with their separate "init.sqf" in it. Can someone clear up how is supposed to work? Does the game automatically detect things to be server side only by the folder name?
  18. Whenever it attempts to load a mission from A2. Both arma2 + OA were installed with Steam on my server pc (winserver2008). How to enable combined ops?
  19. Is it possible to check the terrain sloping a player is currently on? I have tried the Vector functions but they dont return anything useful. ---------- Post added at 02:05 AM ---------- Previous post was at 01:28 AM ---------- nevermind, surfaceNormal appaers to be what I was looking for.
  20. I am trying to get right-click interaction working with items in inventory. 1. Is it possible to imitate using items like in DAYZ with only scripting, without using custom addons? 2. I was thinking to attach some dialog to inventory items but I dont know what handle is used for calling stuff on right clicking. If someone could point me in the right direction that would be nice.
  21. How to slap an addaction on every single object on the map of a specific type? I was looking for examples and I found: {_x setDamage 1} forEach nearestObjects [getPos this,["House"],50] How to modifiy that to grab every object on the map without the need for a reference position?
  22. Thanks deadfast, that was immensely helpful. Cleared up all the confusion. Also thanks to Iceman, you both made this topic a one stop problem solver for us HUD/DIALOG coding newbs.
  23. I might have a similar problem, does anyone have simple example that displays a HUD item on screen after the script is called? So far I only got dialogs working but they block player movement when they are called.
  24. The complete dialogs.hpp class HUD_DIALOG { idd = -1; movingenable = true; class Controls { class HUD_THIRST: RscText { text = "Thirst"; idc = 1000; x = 1.25134; y = 0.655357; w = 0.1; h = 0.1; }; }; }; Defines (copies from your resource) // Control types #define CT_STATIC 0 #define CT_BUTTON 1 #define CT_EDIT 2 #define CT_SLIDER 3 #define CT_COMBO 4 #define CT_LISTBOX 5 #define CT_TOOLBOX 6 #define CT_CHECKBOXES 7 #define CT_PROGRESS 8 #define CT_HTML 9 #define CT_STATIC_SKEW 10 #define CT_ACTIVETEXT 11 #define CT_TREE 12 #define CT_STRUCTURED_TEXT 13 #define CT_CONTEXT_MENU 14 #define CT_CONTROLS_GROUP 15 #define CT_SHORTCUTBUTTON 16 #define CT_XKEYDESC 40 #define CT_XBUTTON 41 #define CT_XLISTBOX 42 #define CT_XSLIDER 43 #define CT_XCOMBO 44 #define CT_ANIMATED_TEXTURE 45 #define CT_OBJECT 80 #define CT_OBJECT_ZOOM 81 #define CT_OBJECT_CONTAINER 82 #define CT_OBJECT_CONT_ANIM 83 #define CT_LINEBREAK 98 #define CT_USER 99 #define CT_MAP 100 #define CT_MAP_MAIN 101 #define CT_LISTNBOX 102 // Static styles #define ST_POS 0x0F #define ST_HPOS 0x03 #define ST_VPOS 0x0C #define ST_LEFT 0x00 #define ST_RIGHT 0x01 #define ST_CENTER 0x02 #define ST_DOWN 0x04 #define ST_UP 0x08 #define ST_VCENTER 0x0C #define ST_GROUP_BOX 96 #define ST_GROUP_BOX2 112 #define ST_ROUNDED_CORNER ST_GROUP_BOX + ST_CENTER #define ST_ROUNDED_CORNER2 ST_GROUP_BOX2 + ST_CENTER #define ST_TYPE 0xF0 #define ST_SINGLE 0x00 #define ST_MULTI 0x10 #define ST_TITLE_BAR 0x20 #define ST_PICTURE 0x30 #define ST_FRAME 0x40 #define ST_BACKGROUND 0x50 #define ST_GROUP_BOX 0x60 #define ST_GROUP_BOX2 0x70 #define ST_HUD_BACKGROUND 0x80 #define ST_TILE_PICTURE 0x90 #define ST_WITH_RECT 0xA0 #define ST_LINE 0xB0 #define ST_SHADOW 0x100 #define ST_NO_RECT 0x200 #define ST_KEEP_ASPECT_RATIO 0x800 #define ST_TITLE ST_TITLE_BAR + ST_CENTER // Slider styles #define SL_DIR 0x400 #define SL_VERT 0 #define SL_HORZ 0x400 #define SL_TEXTURES 0x10 // progress bar #define ST_VERTICAL 0x01 #define ST_HORIZONTAL 0 // Listbox styles #define LB_TEXTURES 0x10 #define LB_MULTI 0x20 // Tree styles #define TR_SHOWROOT 1 #define TR_AUTOCOLLAPSE 2 // MessageBox styles #define MB_BUTTON_OK 1 #define MB_BUTTON_CANCEL 2 #define MB_BUTTON_USER 4 //////////////// //Base Classes// //////////////// class RscText { access = 0; idc = -1; type = CT_STATIC; style = ST_MULTI; linespacing = 1; colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,.5}; text = ""; shadow = 2; font = "Bitstream"; SizeEx = 0.02300; fixedWidth = 0; x = 0; y = 0; h = 0; w = 0; }; class RscPicture { access = 0; idc = -1; type = CT_STATIC; style = ST_PICTURE; colorBackground[] = {0,0,0,0}; colorText[] = {1,1,1,1}; font = "Bitstream"; sizeEx = 0; lineSpacing = 0; text = ""; fixedWidth = 0; shadow = 0; x = 0; y = 0; w = 0.2; h = 0.15; }; class RscButton { access = 0; type = CT_BUTTON; text = ""; colorText[] = {1,1,1,.9}; colorDisabled[] = {0.4,0.4,0.4,0}; colorBackground[] = {0.75,0.75,0.75,0.8}; colorBackgroundDisabled[] = {0,0.0,0}; colorBackgroundActive[] = {0.75,0.75,0.75,1}; colorFocused[] = {0.75,0.75,0.75,.5}; colorShadow[] = {0.023529,0,0.0313725,1}; colorBorder[] = {0.023529,0,0.0313725,1}; soundEnter[] = {"\ca\ui\data\sound\onover",0.09,1}; soundPush[] = {"\ca\ui\data\sound\new1",0,0}; soundClick[] = {"\ca\ui\data\sound\onclick",0.07,1}; soundEscape[] = {"\ca\ui\data\sound\onescape",0.09,1}; style = 2; x = 0; y = 0; w = 0.055589; h = 0.039216; shadow = 2; font = "Bitstream"; sizeEx = 0.03921; offsetX = 0.003; offsetY = 0.003; offsetPressedX = 0.002; offsetPressedY = 0.002; borderSize = 0; }; class RscFrame { type = CT_STATIC; idc = -1; style = ST_FRAME; shadow = 2; colorBackground[] = {1,1,1,1}; colorText[] = {1,1,1,0.9}; font = "Bitstream"; sizeEx = 0.03; text = ""; }; class BOX { type = CT_STATIC; idc = -1; style = ST_CENTER; shadow = 2; colorText[] = {1,1,1,1}; font = "Bitstream"; sizeEx = 0.02; colorBackground[] = { 0.2,0.2,0.2, 0.9 }; text = ""; }; Aren't the dayz hud items dialogs too?
  25. Awesome tut man! A question, I created a HUD item that should be a single word like this class HUD_THIRST: RscText { text = "Thirst"; idc = 1000; x = 1.25134; y = 0.655357; w = 0.1; h = 0.1; }; However 2 problems: 1. It always has a white border, which I would like to get rid of. 2. How to have the HUD item stay always on without blocking the player controls?
×