GolovaRaoul

Undefined variable in expression exileserver_system_database_query_selectSingle

3 posts in this topic

Hello,

I'm trying to make Base Painting a donator-only thing.
Right now I have the SteamUID of donators in a *.sqf file, but it would be much easier if this was handled by the database.

So I altered the "account" table to add an extra columm (basepainting, default 0), I added to exile.ini the following:

Spoiler

[getAccountBasePainting]
SQL1_1 = SELECT basepainting FROM account WHERE uid = ?
Number Of Inputs = 1
SQL1_INPUTS = 1
OUTPUT = 1

and I added this at the top of the base painting script:

Spoiler

/* Old whitelisting method
    _currentPlayer = getPlayerUID player;        
    _vipPlayers = ["VERY LONG LIST..."];
    
    if !(_currentPlayer in _vipPlayers) then 
    {        
        throw "You need to be a Donator in order to Paint your base! For more information, visit www.PixelNationGaming.tk";
    };
    
    */
    // New whitelisting method
    _uid = getPlayerUID player;
    _basepaintingwhitelisted = format['getAccountBasePainting:%1', _uid] call ExileServer_system_database_query_selectSingle;
    _basepaintingwhitelisted  = _basepaintingwhitelisted param [0, 0, [0]];
    if(_basepaintingwhitelisted isEqualTo 0)then
    {
        throw "You need to be a Donator in order to Paint your base! For more information, visit www.PixelNationGaming.tk";
    };

But when I try to acces the Paint script in-game (I should not have acces to it, I have basepainting = 0) I get the following error:

Spoiler

'...'getAccountBasePainting:%1, _uid] call
|#|ExileServer_system_database_query_select...'
Error Undefined variable in expression:
File mpmissions\__CUP_MP.Chernarus_Isles\Custom\Paint\Paint\SM_Paint.sqf, line 34
exileserver_system_database_query_selectsingle

As far as I can tell, it doesn't recognise the function exileserver_system_database_query_selectsingle as something that can be called... Not sure

Wish that somebody could help me out :)

Thanks for responding!
GolovaRaoul

Share this post


Link to post
Share on other sites
13 hours ago, Tom ♋ ツ Flames said:

Have you updated your database?

you might need to remove "Number of inputs"

What you mean by updated database? Added a extra columm with 'basepainting'? Yes. Included the Query in Exile.ini located in extDB\sql_custom_v2? Yes I did.

I triedremoving the "Number of inputs" in the query, same result

Share this post


Link to post
Share on other sites
Advertisement

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

  • Recently Browsing   0 members

    No registered users viewing this page.