Jump to content
Sign in to follow this  
jaynus

JayArma2Lib

Recommended Posts

Updated to version 1.3.2.

Supports latest beta, B73115

damn.. too slow... it is up to B73116. Must be wasting too much time sleeping... tic. thanks mate... very good work.

Edited by gonk

Share this post


Link to post
Share on other sites

Can´t find the version 1.3.3 which is named in the first post - the link only provides the version 1.3.2.

Highly awaiting the version for the new BETA 73116...

Share this post


Link to post
Share on other sites

Sigh yah...BIS released 73115 and then 73116 back to back within a couple hours :|

Will have it out today.

Share this post


Link to post
Share on other sites
Dont hesitate.... i know i´m a little bit ACRE addicted! ;-)

There's one change between 73115 and 73116, instead of being pushy why not use *115?

Share this post


Link to post
Share on other sites
There's one change between 73115 and 73116, instead of being pushy why not use *115?

Yes, you´re right. Didn´t recognized that.

One question: The new ACRE 1.10 has the same JayArma2Lib (1.3.3)? Because the versionnumbers are not updated in the changelog.txt.

Edited by MadMike[Brig2010]

Share this post


Link to post
Share on other sites
Yes, you´re right. Didn´t recognized that.

One question: The new ACRE 1.10 has the same JayArma2Lib (1.3.3)? Because the versionnumbers ar not updated in the changelog.txt.

It does have the latest as of this morning.

Share this post


Link to post
Share on other sites

Where did you learn how to code the dll injection? I'm curious about how this works and was wondering if you have any suggestions for good tutorials or places to start.

Share this post


Link to post
Share on other sites
More reason to have a remote DB, no disk IO issues on the gameserver.

Solution (to a non-existent problem imo): Write a pipe -> ms/mysql connector, I'm sure it would be appreciated by those that need it. Otherwise sqlite is perfect for stats and dyn missions, etc.

The reason I say it's non-existent, is because it was based on an assumption. Stats tracking should do fine. You're only as fast as the game engine anyways, if the sqf engine couldn't handle the data throughput, either could the hooking engine. Use intelligent caching, only write data that matters, etc.

For example, benny has stats tracking in warfare, and he uses the damn clipboard buffer! (no armalib) So I'd recommend you try it before suggesting major changes to a system that already works. The 'remote' argument is totally valid, but hopefully BIS will fix the UDP command someday, or a community member could write a plugin for armalib or pipe->whatever connector. You can also read the sqlite db file periodically. (why does it need to be 'instant', can't it be delayed by a few minutes?)

I'd start fleshing out your stats tracking with the implementation that jay has already put in, you could start today, work around any problems that come up later.

To the guy that asked about DLL injection, google 'dll injection tutorial', the first link from edge of nowhere is good, as are others. There really isn't a simpler answer.

Cheers

Share this post


Link to post
Share on other sites

updated for new betas

I didnt increment the version number (left it at 1.3.3), as most everything else said it was 1.3.2 :)

- Added OA 1.54 B73246 NON-STEAM beta support

- Added OA 1.54 B73206 NON-STEAM beta support

- Added OA 1.54 B73116 NON-STEAM beta CLIENT-ONLY(no server) support

Share this post


Link to post
Share on other sites

Just tried them with Beta 73251 (as told in the first post) - JA2L couldn´t detect version of ArmA error occurs. Rolled back to 73246 and all is fine.

So i´m waiting for the next release which is compatible to the new Beta 73311. Couldn´t await to test the new MP backpack commands... :yay:

Share this post


Link to post
Share on other sites
Any news about a new version with support fot Beta 73311?

Regards,

Mike

Jay will not be around for a while. His mother passed away this week and he is out of town dealing with that. :(

So have patience!

Share this post


Link to post
Share on other sites

My condolences to you and your family, that is terribly sad news.

I asked this question over in the Acre thread and was directed to ask here. I tried running this example by changing the name of the pipe and a small test script. It is able to successfully connect and write the data but the return value from the write is not true/false, it's a string "_JERR_NULL". Is there anything special I need to do in the code to return a true handle from the successful write, which is then passed to JayArma2Lib dll, then passed as a return value to the script in Arma2? Thanks.

http://msdn.microsoft.com/en-us/library/aa365588%28v=VS.85%29.aspx

// Named Pipe Test

_pipeHandle = ["\\.\pipe\armapipe"] call jayarma2lib_fnc_openpipe;
if(!isNil("_pipeHandle")) then
{
player sidechat "Pipe connected!";
//success!
_ret = [_pipeHandle, "Hello from Arma!"] call jayarma2lib_fnc_writepipe;
if(_ret == true) then
{
	player sidechat "Write success";
}
else
{
	player sidechat "Write failed";
};
player sidechat _ret;  //<- this is returning a string as "_JERR_NULL"
}
else
{
player sidechat "Unable to connect to named pipe :(";
};

Share this post


Link to post
Share on other sites

while {(GVAR(runServer))} do {
		if(isNil QUOTE(GVAR(pipeHandle))) then {
			LOG("ATEEEMPTING TO OPEN PIPE!");
			GVAR(pipeHandle) = ["\\.\pipe\acre_comm_pipe"] call jayarma2lib_fnc_openPipe;
			if(isNil(QUOTE(GVAR(pipeHandle)))) then { 
				if(time > 5) then {
					hintSilent "WARNING: ACRE IS NOT CONNECTED TO TEAMSPEAK!";
					LOG("Teamspeak3 not responding, trying again.");
				};
				GVAR(serverStarted) = false;
			} else {
				LOG("PIPE OPENED!");
				GVAR(serverStarted) = true;
			};
		};
		sleep 5;
	};

and in another script (read script)...

if(!(isNil QUOTE(GVAR(pipeHandle)))) then {
	_ret = [GVAR(pipeHandle)] call jayarma2lib_fnc_readPipe;
	if(!(isNil "_ret")) then {
		if(!(_ret == "_JERR_FALSE")) then {
			if(_ret != "_JERR_NULL") then {
				TRACE_1("got message", _ret);
				_ret call GVAR(ioEventFnc);
			};
		} else {
			GVAR(pipeHandle) = nil;
		};
	};
};

---------- Post added at 01:56 PM ---------- Previous post was at 01:55 PM ----------

oh and I forgot to mention - we use async pipes in JayArmA2Lib, so read will *always* return instantly, it does not block. Same with write. So you can guarantee off of those basic return values in read whether the read was successful or not.

Write operates basically the same. But we have it as a *guaranteed* communication of a single packet if the pipe is open. No partial packet failures.

---------- Post added at 02:12 PM ---------- Previous post was at 01:56 PM ----------

Added OA Beta 73968 Support

VERSION 1.3.5

- Added OA 1.54 B73968 NON-STEAM beta support

Share this post


Link to post
Share on other sites

A few small questions:

1) Does ACRE use one named pipe for all communication?

2) Does ACRE use both reading and writing to the pipe? Can this be done on the same pipe?

Thanks.

Share this post


Link to post
Share on other sites
A few small questions:

1) Does ACRE use one named pipe for all communication?

2) Does ACRE use both reading and writing to the pipe? Can this be done on the same pipe?

Thanks.

Yes to both.

Share this post


Link to post
Share on other sites

Seems its a great addon! But I cant make it work ;(

I installed CBA, jayarma2lib and copied existing sqlite db to arma II folder.

Then exec:

_testhandler = ["mytest.sqlitedb"] call jayarma2lib_fnc_sqlOpen;
[_testhandler, "create table testing(number,string);"] call jayaram2lib_fnc_sqlExec;
[_testhandler, "insert into test values(1, 'foobar') "] call jayaram2lib_fnc_sqlExec;
_rowArray = [_testhandler, "select * from test"] call jayaram2lib_fnc_sqlExecSelect;
[_testhandler] call jayarma2lib_fnc_sqlClose;

And nothing happens.. really looked for the answer on the inet for 2 hours..

Maybe I miss some DLL or smthg?

All I need - is save/load some stringarrays from a file or sql db...

Thank you.

Share this post


Link to post
Share on other sites

I've noticed the Steam version of Arma2 has not been supported since 1.3.1. Is there any chance of Steam being supported in the future? Or, for those of us who purchased through Steam, is there anything we can do to the file to make it compatible with more recent beta patches?

Thanks for your time and all of the great things you bring to the community!

Edited by Spectator6

Share this post


Link to post
Share on other sites

It's perfectly compatible with Steam, I think non-Steam means it's not a patch distributed via Steam. Running 73968 beta with Steam and latest Jaylib without problems here.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×