Jump to content

EXTDB3 returns "any"

Recommended Posts

Okay so for the past two hours I was dealing with an error and I wasn't able to find a solution so I decided to come here and ask you people if anybody knows how to get this working. Basically, I have an ExtDB3 and one of the sql commands returns the name of the player when given the UID. The problem is that whatever I do and whatever I try when I try to get the value it always returns as "any"

This is the function that calls the fn_AsyncCall, sets the value of _ret to be equal to the output of the SQL command, but _ret is always null.


CheckPlayer = 

    _player = _this select 0;
    _playerUID = getPlayerUID _player;
    diag_log format ["Checking player  with UID %2", _playerUID];
    systemChat format ["Checking player with UID %2", _playerUID];
    _query = format["getName:%1", _playerUID];
    _ret = [_query, 2] call databaseAsyncCall;
    diag_log format ["Return value: %1", _ret];
    systemChat format ["Return value: %1", _ret];



This is the command which is my custom_sql file


SQL1_1 = SELECT name FROM players WHERE steamID = ?;


and this is how I call the function from initPlayerLocal.sqf


_player = _this select 0;

[_player] call CheckPlayer;



I don't know if it's me doing something wrong or something else, but it just returns "any".

P.S.: Other SQL Commands which don't require output (e.g.: to insert a player into the database work completely fine)

Share this post

Link to post
Share on other sites

I had a problem with inserting data in my database and it inserted 'any' too.


That was because if you execute a command on the server, you can't use the command 'player'.

For example, if you execute (getPlayerUID player) on the server, the value will be empty because the server doesn't have a steamID.

And if you try to execute (profileName), it will be 'arma3'.


I gave each playable unit a variable name to solve the problem.

Share this post

Link to post
Share on other sites

Heyo sorry for the later reply. Got the actual thing working on the day of the post but didn't forgot to post the solution. So it turns out that I had the wrong tbbmalloc installed and I've just downloaded it from their official website :icon_biggrin: 

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