Schön guten Tag
ich habe das Marktsystem [ Marktsytsem] eingefügt, habe alle fehler beseitigt, und nun stehen keien Fehler mehr in den Logs.
Trotzdem habe ich den Fehler:
ich gehe Ingame , dann drücke ich die Z.taste drück auf Markt, und dann öffnet er mir dies auch,
er Zewigt mir kein fehler an soweit gut, aber dann zeigt er mir keine Items an.
fn_config.sqf
/*
##################### DYNAMIC MARKET SCRIPT #####################
### AUTHOR: RYAN TT. ###
### STEAM: http://www.steamcommunity.com/id/ryanthett ###
### ###
### DISCLAIMER: THIS SCRIPT CAN BE USED ON EVERY SERVER ONLY ###
### WITH THIS HEADER / NOTIFICATION ###
#################################################################
*/
// ███████████████████████████████████████████████████████████████████████
// █████████████████ DYNAMIC MARKET BASIC CONFIGURATION ██████████████████
// ███████████████████████████████████████████████████████████████████████
DYNMARKET_Serveruptime = 08; // Serveruptime after restart in hours
DYNMARKET_UseExternalDatabase = true; // Should the script use the External Database?
DYNMARKET_PriceUpdateInterval = 01; // After how many minutes should the price be updated?
DYNMARKET_CreateBackups = true; // Should the server save write the prices regulary into the Database? If false, it will save the prices before Server-restart?
DYNMARKET_CreateBackupInterval = 01; // After how many updates (PriceUpdateIntervals) should the prices be saved into the Database?
DYNMARKET_UserNotification = true; // Should the user be informed with a hint whenever the prices got updated?
// █████████████████ USER NOTIFICATION TEXTS █████████████████
DYNMARKET_UserNotification_Text =
[
"Die Preise wurden akutalisiert",
"Die Marktpreise werden ermittelt"
];
// █████████████████ ITEM GROUP CONFIGURATION █████████████████
DYNMARKET_Items_Groups =
[
["Legal",
[
["apple",-1,40,120],
["peach",-1,40,120],
["oil_processed",-1,3000,5500],
["copper_refined",-1,1200,2800],
["iron_refined",-1,1400,3100],
["salt_refined",-1,2000,3800],
["glass",-1,2200,3300],
["diamond_cut",-1,4000,5800],
["cement",-1,2800,3600],
["bier_processed",-1,1500,2300],
["uran_processed",-1,4900,7700]
],
1.5
],
["Illegal",
[
["heroin_processed",-1,40,120],
["marijuana",-1,4500,6700],
["cocaine_processed",-1,5500,8100]
],
2.5
]
];
// █████████████████ ALL SELLABLE ITEMS █████████████████
DYNMARKET_Items_ToTrack =
[
["apple",80],
["peach",80],
["oil_processed",4900],
["copper_refined",1999],
["iron_refined",2200],
["salt_refined",2800],
["glass",3000],
["diamond_cut",5100],
["cement",3500],
["heroin_processed",7499],
["marijuana",6000],
["cocaine_processed",7000]
];
//███████████████████████████████████████████████████████████████████████
//██████████████████ DO NOT MODIFY THE FOLLOWING CODE! ██████████████████
//███████████████████████████████████████████████████████████████████████
DYNMARKET_Items_CurrentPriceArr = [];
DYNMARKET_sellarraycopy = DYNMARKET_Items_ToTrack;
DYNMARKET_Serveruptime = (DYNMARKET_Serveruptime * 3600) - 300;
{
_currentArray = _x;
DYNMARKET_Items_CurrentPriceArr pushBack [_currentArray select 0,_currentArray select 1,0];
} forEach DYNMARKET_Items_ToTrack;
publicVariable "DYNMARKET_UserNotification";
publicVariable "DYNMARKET_UserNotification_Text";
if (DYNMARKET_UseExternalDatabase) then {[1] call TON_fnc_HandleDB;};
DYNMARKET_UpdateCount = 0;
if (DYNMARKET_UseExternalDatabase) then {
[] spawn {
sleep DYNMARKET_Serveruptime;
diag_log "### DYNMARKET >> CURRENT PRICES ARE BEING WRITTEN TO THE DATABASE ###";
diag_log "### DYNMARKET >> AS PLANNED, AWAITING RESULT... ###";
[0] call TON_fnc_HandleDB;
};
};
sleep 5;
[] call TON_fnc_sleeper;