Moin Leute.
Bin gerade dabei extDB2 bei mir einzufügen...
Benutze die neuste 3er Version.
Ich habe seitdem folgende Fehlermeldungen..
Spoiler anzeigen
Code
10:56:23 "------------- Vendetta Auction House Initialization -------------"
10:56:23 "Query: SELECT id, type, amount, item, price, seller, sellername, status, time FROM ah"
10:56:23 "Result: any"
10:56:23 "------------------------------------------------"
10:56:23 Error in expression <",_query];
diag_log format["Result: %1",_rows];
diag_log "---------------------->
10:56:23 Error position: <_rows];
diag_log "---------------------->
10:56:23 Error Undefined variable in expression: _rows
10:56:23 File life_server\Functions\vAH\fn_vAH_init.sqf, line 15
10:56:23 Error in expression < _return) > 0) then {
_return = _return select 0;
};
_return;
>
10:56:23 Error position: <select 0;
};
_return;
>
10:56:23 Error Generic error in expression
10:56:23 File life_server\Functions\MySQL\fn_asyncCall.sqf, line 48
10:56:53 "[Display #24]"
10:57:13 Error in expression < _return) > 0) then {
_return = _return select 0;
};
_return;
>
10:57:13 Error position: <select 0;
};
_return;
>
10:57:13 Error Generic error in expression
10:57:13 File life_server\Functions\MySQL\fn_asyncCall.sqf, line 48
Alles anzeigen
Meine Files:
Code
/*
File: fn_vAH_init.sqf
Description: Initialized the new Auction house/shop
Author: Fresqo
*/
private["_query","_queryResult","_rows","_new"];
vAH_loaded = false;
publicVariable "vAH_loaded";
_query = format["SELECT id, type, amount, item, price, seller, sellername, status, time FROM ah"];
_queryResult = [_query,2,true] call DB_fnc_asyncCall;
_rows = call compile format["%1",_queryResult];
diag_log "------------- Vendetta Auction House Initialization -------------";
diag_log format["Query: %1",_query];
diag_log format["Result: %1",_rows];
diag_log "------------------------------------------------";
//Parse item
{_new = [(_x select 3)] call DB_fnc_mresToArray;
if(typeName _new == "STRING") then {_new = call compile format["%1", _new];};
_x set[3,_new];} forEach _rows;
all_ah_items = _rows;
publicVariable "all_ah_items";
vAH_loaded = true;
publicVariable "vAH_loaded";
Alles anzeigen
Code
/*
File: fn_asyncCall.sqf
Modified: DeadP4xel
Description:
Calls an async request to extDB
*/
private["_queryStmt","_result","_key","_mode","_return","_loop"];
// CONVERT DATA
_queryStmt = [_this,0,"",[""]] call BIS_fnc_param;
_mode = [_this,1,1,[0]] call BIS_fnc_param;
_multiarr = [_this,2,false,[false]] call BIS_fnc_param;
_return = false;
_result = "";
// SEND EXTDB REQUEST AND COLLECT DATA
_key = "extDB2" callExtension format["%1:%2:%3",_mode,(call life_sql_id),_queryStmt];
if(_mode isEqualTo 1) exitWith {true};
_key = call compile format ["%1",_key];
_key = _key select 1;
// DATA COLLECTED NOW SEND MULTI / SOLO DATA
_loop = true;
while{_loop} do {
_result = "extDB2" callExtension format ["4:%1",_key];
if(_result isEqualTo "[5]") then {
_result = "";
while {true} do {
_pipe = "extDB2" callExtension format ["5:%1",_key];
if(_pipe isEqualTo "") exitWith {_loop = false};
_result = _result + _pipe;
};
} else {
if(_result isEqualTo "[3]") then {
uiSleep 0.1;
} else {
_loop = false;
};
};
};
// DATA CONVERTED FROM QUERY REQUEST
_result = call compile _result;
if(count (_result select 1) isEqualTo 0) exitWith {[]};
_return = _result select 1;
if(!_multiarr && (count _return) > 0) then {
_return = _return select 0;
};
_return;
Alles anzeigen