Jump to content
Snipes Murphy

[Tutorial] Advanced Banking System, With Pins.

Recommended Posts

7 hours ago, imthatguyhere said:

Very odd, can you send a extDB3 log from when you tried it?

maybe because i have adac too i dont know,


extDB3: https://bitbucket.org/torndeco/extdb3/wiki/Home
extDB3: Version: 1.031
extDB3: Windows Version
Message: All development for extDB3 is done on a Linux Dedicated Server
Message: If you would like to Donate to extDB3 Development
Message: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2SUEFTGABTAM2
Message: Also leave a message if there is any particular feature you would like to see added.
Message: Thanks for all the people that have donated.
Message: Torndeco: 18/05/15


extDB3: Found extdb3-conf.ini
extDB3: Detected 4 Cores, Setting up 4 Worker Threads
extDB3: ...
extDB3: ...
extDB3: ...
extDB3: ...


[22:10:25:845800 +00:00] [Thread 1296] extDB3: SQL: Initialized: Add Quotes around TEXT Datatypes mode: 2
[22:10:25:845862 +00:00] [Thread 1296] extDB3: SQL: Initialized: NULL = ""
[22:10:25:845885 +00:00] [Thread 1296] extDB3: Locked

 

(i find this is rpt server and client:

Client side

22:12:28 Error in expression <>> "pin_system") isEqualTo 1) then {
if(life_bankingpin == (parseNumber _pinText>
22:12:28   Error position: <life_bankingpin == (parseNumber _pinText>
22:12:28   Error Variável indefinida na expressão: life_bankingpin
22:12:28 File core\banking\fn_PINMenu.sqf [life_fnc_PINMenu], line 46
22:12:45 Error in expression <>> "pin_system") isEqualTo 1) then {
if(life_bankingpin == (parseNumber _pinText>
22:12:45   Error position: <life_bankingpin == (parseNumber _pinText>
22:12:45   Error Variável indefinida na expressão: life_bankingpin
22:12:45 File core\banking\fn_PINMenu.sqf [life_fnc_PINMenu], line 46

22:11:25 "Executing client.fsm"
22:11:25 "Display 46 Found"
22:11:25 Error in expression <itUntil {scriptDone _handle};
};
};

if(life_bankingpin == 0 && getNumber(missio>
22:11:25   Error position: <life_bankingpin == 0 && getNumber(missio>
22:11:25   Error Variável indefinida na expressão: life_bankingpin
22:11:25 File mpmissions\__CUR_MP.Altis\core\init.sqf, line 101

Server side

  1. "Market prices generated!"
  2. "Server FSM executed"
  3. "Server FSM timer"
  4. Server: Object 0:0 not found (message Type_181)
  5. Server: Object 0:0 not found (message Type_181)
  6. Error in expression <players WHERE pid='%1'",_uid];};
  7. _tmp = _queryResult select 12;
  8. _queryResult set>
  9.   Error position: <_queryResult select 12;
  10. _queryResult set>
  11.   Error Undefined variable in expression: _queryresult
  12. File \life_server\Functions\MySQL\fn_queryRequest.sqf [DB_fnc_queryRequest], line 83
  13.  Mission id: a938407b10a892229095358a5c5a0b7ce757d0a8
  14. Error: Object(4 : 11) not found
  15. Class  destroyed with lock count 2

i go upload that files 

init.sqf  https://pastebin.com/r4dqRHMz

fn_PINMenu.sqf   https://pastebin.com/GyJKd1Gj

fn_queryRequest.sqf https://pastebin.com/Ahw5BRQk

Share this post


Link to post
Share on other sites
On 3/10/2019 at 9:11 AM, Puma Power.PT said:

you see somthing wrong?

Pastebin your "fn_requestReceived.sqf". That's where that pin should get set.

Share this post


Link to post
Share on other sites
9 hours ago, imthatguyhere said:

like this?? (i have the class east and that script not have for that side??)

if (isNull _ownerID) exitWith {};
_ownerID = owner _ownerID;

_query = switch (_side) do {
    // West - 11 entries returned
    case west: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, cop_licenses, coplevel, cop_gear, blacklist, cop_stats, banking_pin, playtime FROM players WHERE pid='%1'",_uid];};
_tmp = _queryResult select 12;
_queryResult set[16,[_tmp] call DB_fnc_numberSafe];


   //East
    case east: {format["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, adac_licenses, adaclevel, adac_gear, adac_stats, banking_pin, playtime FROM players WHERE pid='%1'",_uid];};
_tmp = _queryResult select 14;
_queryResult set[16,[_tmp] call DB_fnc_numberSafe];


    // Civilian - 12 entries returned
    case civilian: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, civ_licenses, arrested, civ_gear, civ_stats, banking_pin, civ_alive, civ_position, playtime FROM players WHERE pid='%1'",_uid];};
_tmp = _queryResult select 13;
_queryResult set[16,[_tmp] call DB_fnc_numberSafe];


    // Independent - 10 entries returned
    case independent: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, med_licenses, mediclevel, med_gear, banking_pin, med_stats, playtime FROM players WHERE pid='%1'",_uid];};
_tmp = _queryResult select 11;
_queryResult set[16,[_tmp] call DB_fnc_numberSafe];


};

Edited by Puma Power.PT

Share this post


Link to post
Share on other sites
10 hours ago, imthatguyhere said:

now stuck in receiving data i look in rpt server

"Market prices generated!"
"Server FSM executed"
"Server FSM timer"
Server: Object 0:0 not found (message Type_181)
Server: Object 0:0 not found (message Type_181)
Error in expression <players WHERE pid='%1'",_uid];};
_tmp = _queryResult select 12;
_queryResult set>
  Error position: <_queryResult select 12;
_queryResult set>
  Error Undefined variable in expression: _queryresult
File \life_server\Functions\MySQL\fn_queryRequest.sqf [DB_fnc_queryRequest], line 83
Error in expression <) isEqualTo _uid) exitWith {
_x set [1, _time_gathered];
_x set [2, time];
};
} >
  Error position: <_time_gathered];
_x set [2, time];
};
} >
  Error Undefined variable in expression: _time_gathered
File \life_server\Functions\PlayTime\fn_setPlayTime.sqf [TON_fnc_setPlayTime], line 24
Error in expression <st pushBack [_uid, _new];
};
[_uid,_new select 2] call TON_fnc_setPlayTime;


_h>
  Error position: <select 2] call TON_fnc_setPlayTime;


_h>
  Error Zero divisor
File \life_server\Functions\MySQL\fn_queryRequest.sqf [DB_fnc_queryRequest], line 210
 Mission id: 756e1d8a47a92cf4a72a83ca6f5930dda7ffc55a

 

 

 

https://pastebin.com/bMwF6z3B

Edited by Puma Power.PT

Share this post


Link to post
Share on other sites
14 hours ago, Puma Power.PT said:

What's with the random "_tmp" stuff in the _query cases? You are supposed to only have the format there as you are setting "_query" to the content of the case, not running code there. There's no result at that point to set. You also need to match the selected items to the selects down below. Each item is returned starting at 0. So this select: "_new = [(_queryResult select 12)] call DB_fnc_mresToArray;" Would actually be getting "banking_pin" for civs instead of the playtime it thinks it is:

image.png.a4fe176b1bf2fed05999e4f905723d7f.png

Share this post


Link to post
Share on other sites
7 hours ago, imthatguyhere said:

What's with the random "_tmp" stuff in the _query cases? You are supposed to only have the format there as you are setting "_query" to the content of the case, not running code there. There's no result at that point to set. You also need to match the selected items to the selects down below. Each item is returned starting at 0. So this select: "_new = [(_queryResult select 12)] call DB_fnc_mresToArray;" Would actually be getting "banking_pin" for civs instead of the playtime it thinks it is:

image.png.a4fe176b1bf2fed05999e4f905723d7f.png

the playtime FROM players WHERE pid='%1'", count too??

i need remove _queryResult or the _tmp ?

 

Edited by Puma Power.PT

Share this post


Link to post
Share on other sites
9 hours ago, imthatguyhere said:

What's with the random "_tmp" stuff in the _query cases? You are supposed to only have the format there as you are setting "_query" to the content of the case, not running code there. There's no result at that point to set. You also need to match the selected items to the selects down below. Each item is returned starting at 0. So this select: "_new = [(_queryResult select 12)] call DB_fnc_mresToArray;" Would actually be getting "banking_pin" for civs instead of the playtime it thinks it is:

image.png.a4fe176b1bf2fed05999e4f905723d7f.png

i try make new file but i dont know where i add some parameters like this:

 * In case west, add
*/
_tmp = _queryResult select 12;
_queryResult set[16,[_tmp] call DB_fnc_numberSafe];
/*
 * In case independent, add
*/
_tmp = _queryResult select 11;
_queryResult set[16,[_tmp] call DB_fnc_numberSafe];
/*
 * In case civilian, add
*/
_tmp = _queryResult select 13;
_queryResult set[16,[_tmp] call DB_fnc_numberSafe];
 

https://pastebin.com/dTgzeLvx

can help me add that?

and not have case east

 

If I could help, I would be very grateful.

Share this post


Link to post
Share on other sites
15 hours ago, Puma Power.PT said:

Deposit in the gang and withdraw not working, I can hear the sound clicking but nothing happens not open sub menu 

Pastebin a Client RPT from when you tried it.

Share this post


Link to post
Share on other sites
6 hours ago, imthatguyhere said:

Not seeing the error in there. Just try to refollow the tutorial (except the one file we fixed) and make sure everything was done as stated.

ok 

Share this post


Link to post
Share on other sites
18 hours ago, Puma Power.PT said:

still not working :/

You can try to Pastebin another Server and Client RPT from when you tried it, but if there's no errors again, it sounds like this one isn't going to work for you.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...