Nein wieso auch
[TUTORIAL][Altis Life 4.4r3] RyanTTs Dynamic Market System
-
- Altis Life
-
blackfisch -
27. Juli 2016 um 01:04
-
-
Hallo,
haben folgendes Problem:
Wenn man bei uns auf dem Server Äpfel oder Pfirsiche verkauft, aktualisiert sich alles wunderbar, nur verkauft man bsp. Kupfer oder Eisen, ändert sich der Preis im DynMarket nicht, wo könnte da der Fehler liegen?
In den Logs wird kein Fehler gemeldet.
Danke für die Hilfe.
Version: extDB2, Tanoa Life 4.4 R4
-
schick mal die config
-
Code
Alles anzeigen/* ##################### DYNAMIC MARKET SCRIPT ##################### ### AUTHOR: RYAN TT. ### ### STEAM: 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 = 05; // 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 = [ "", "" ]; // █████████████████ ITEM GROUP CONFIGURATION █████████████████ DYNMARKET_Items_Groups = [ ["Legal", [ ["apple",-1,10,50], ["peach",-1,30,100] ], 0.5 ], ["Illegal", [ /*["peach",-1,30,100]*/ ], 0.5 ] ]; // █████████████████ ALL SELLABLE ITEMS █████████████████ DYNMARKET_Items_ToTrack = [ ["apple",25], ["peach",50], ["tbacon",125], ["donuts",130], ["rabbit_raw",150], ["rabbit",170], ["ornate_raw",190], ["ornate",190], ["mackerel_raw",190], ["mackerel",190], ["tuna_raw",190], ["tuna",190], ["mullet_raw",190], ["mullet",200], ["catshark_raw",200], ["catshark",200], ["turtle_soup",200], ["hen_raw",200], ["hen",200], ["rooster_raw",210], ["sheep_raw",210], ["sheep",155], ["goat_raw",155], ["goat",300], ["redgull",1500], ["coffee",10], ["waterBottle",10], ["pickaxe",350], ["fuelFull",500], ["spikeStrip",1200], ["lockpick",75], ["goldbar",95000], ["blastingcharge",35000], ["boltcutter",7500], ["defusekit",2500], ["storagesmall",75000], ["storagebig",15000], ["oil_processed",1200], ["copper_refined",1700], ["iron_refined",1650], ["salt_refined",1850], ["glass",1450], ["diamond_cut",2530], ["cement",2350], ["heroin_processed",5000], ["marijuana",5250], ["cocaine_processed",5300] ]; //███████████████████████████████████████████████████████████████████████ //██████████████████ 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;
-
Du hast nur die Apfel und die Pfirsiche eingetragen, wenn du willst dass Eisen etc. mit im System einbegriffen wird, musst du sie hinzufügen. Ungefähr so :
In diesem Fall habe ich Eisen hinzugefügt...mit einem Minimalwert von 50 und einem Höchstwert von 1000 €
Code
Alles anzeigen/* ##################### DYNAMIC MARKET SCRIPT ##################### ### AUTHOR: RYAN TT. ### ### STEAM: 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 = 05; // 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 = [ "", "" ]; // █████████████████ ITEM GROUP CONFIGURATION █████████████████ DYNMARKET_Items_Groups = [ ["Legal", [ ["apple",-1,10,50], ["peach",-1,30,100], ["iron_refined",-1,50,1000] --- Hier hinzufügen ], 0.5 ], ["Illegal", [ /*["peach",-1,30,100]*/ ], 0.5 ] ]; // █████████████████ ALL SELLABLE ITEMS █████████████████ DYNMARKET_Items_ToTrack = [ ["apple",25], ["peach",50], ["tbacon",125], ["donuts",130], ["rabbit_raw",150], ["rabbit",170], ["ornate_raw",190], ["ornate",190], ["mackerel_raw",190], ["mackerel",190], ["tuna_raw",190], ["tuna",190], ["mullet_raw",190], ["mullet",200], ["catshark_raw",200], ["catshark",200], ["turtle_soup",200], ["hen_raw",200], ["hen",200], ["rooster_raw",210], ["sheep_raw",210], ["sheep",155], ["goat_raw",155], ["goat",300], ["redgull",1500], ["coffee",10], ["waterBottle",10], ["pickaxe",350], ["fuelFull",500], ["spikeStrip",1200], ["lockpick",75], ["goldbar",95000], ["blastingcharge",35000], ["boltcutter",7500], ["defusekit",2500], ["storagesmall",75000], ["storagebig",15000], ["oil_processed",1200], ["copper_refined",1700], ["iron_refined",1650], ["salt_refined",1850], ["glass",1450], ["diamond_cut",2530], ["cement",2350], ["heroin_processed",5000], ["marijuana",5250], ["cocaine_processed",5300] ]; //███████████████████████████████████████████████████████████████████████ //██████████████████ 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;
-
Du musst sie hier auch Eintragen
-
DYNMARKET_Items_Groups = - [
- ["Legal",
- [
- ["apple",-1,10,50],
- ["peach",-1,30,100]
- ],
-
Du hast nur die Apfel und die Pfirsiche eingetragen, wenn du willst dass Eisen etc. mit im System einbegriffen wird, musst du sie hinzufügen. Ungefähr so :
In diesem Fall habe ich Eisen hinzugefügt...mit einem Minimalwert von 50 und einem Höchstwert von 1000 €
Code
Alles anzeigen/* ##################### DYNAMIC MARKET SCRIPT ##################### ### AUTHOR: RYAN TT. ### ### STEAM: 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 = 05; // 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 = [ "", "" ]; // █████████████████ ITEM GROUP CONFIGURATION █████████████████ DYNMARKET_Items_Groups = [ ["Legal", [ ["apple",-1,10,50], ["peach",-1,30,100], ["iron_refined",-1,50,1000] --- Hier hinzufügen ], 0.5 ], ["Illegal", [ /*["peach",-1,30,100]*/ ], 0.5 ] ]; // █████████████████ ALL SELLABLE ITEMS █████████████████ DYNMARKET_Items_ToTrack = [ ["apple",25], ["peach",50], ["tbacon",125], ["donuts",130], ["rabbit_raw",150], ["rabbit",170], ["ornate_raw",190], ["ornate",190], ["mackerel_raw",190], ["mackerel",190], ["tuna_raw",190], ["tuna",190], ["mullet_raw",190], ["mullet",200], ["catshark_raw",200], ["catshark",200], ["turtle_soup",200], ["hen_raw",200], ["hen",200], ["rooster_raw",210], ["sheep_raw",210], ["sheep",155], ["goat_raw",155], ["goat",300], ["redgull",1500], ["coffee",10], ["waterBottle",10], ["pickaxe",350], ["fuelFull",500], ["spikeStrip",1200], ["lockpick",75], ["goldbar",95000], ["blastingcharge",35000], ["boltcutter",7500], ["defusekit",2500], ["storagesmall",75000], ["storagebig",15000], ["oil_processed",1200], ["copper_refined",1700], ["iron_refined",1650], ["salt_refined",1850], ["glass",1450], ["diamond_cut",2530], ["cement",2350], ["heroin_processed",5000], ["marijuana",5250], ["cocaine_processed",5300] ]; //███████████████████████████████████████████████████████████████████████ //██████████████████ 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;
Vielen Dank, nun weiß ich wie es funktioniert, manchmal kann es so einfach sein
-
Und wie macht man es wenn man zB Kupfer verkauft und es soll nur bei Eisen der Preis steigen weil so steigen ja überall die Preise oder nicht ?
-
in der selben Gruppe dann eintragen
-
Also kann man mehr Gruppen machen und wie die Heisen ist egal oder wie?
-
-
Habe zurzeit ein Problem. Habe auch folgenden Fehler in der .rptLog
Ich weiß halt nicht was davon der Fehler ist.
Code18:04:05 Error in expression <}; } forEach DYNMARKET_sellarraycopy; } forEach DYNMARKET_Items_CurrentPriceArr;> 18:04:05 Error position: <forEach DYNMARKET_Items_CurrentPriceArr;> 18:04:05 Error foreach: Type String, expected Array 18:04:05 File \life_server\Functions\DynMarket\fn_HandleDB.sqf [TON_fnc_HandleDB], line 53 18:04:36 "[Display #24]"
Die File ist nochmal hochgeladen und die .rpt Log auch
Vielen Dank im Vorraus
-
Keiner eine Idee?
-
Denke du hast irgendwo etwas falsch rein gesetzt nicht in der fn_HandlerDB.sqf muß etwas anderes sein
-
Den selben Fehler hatte ich auch mal,
Habe dann in der fn_configDYNMARKET_UseExternalDatabase von false auf true gesetzt und dann war der komischerweise weg......
-
Bei mir ist er schon true
-
hallo kann mich da mal jemand aufklären also wieso steht in der config bei torrak ein preis von 50 wenn ich es dann kaufe kostet 65?
und
["peach",-1,30,100], <---- was bedeuten diese zahlen genau??
DYNMARKET_Items_ToTrack =
["peach",50], <------- defination warum 50 ??
-
50 ist der normale Wert
-1,30,100
-1 muss bleiben 30 ist der minimale Wert 100 der maximale Wert ist aber Verkauf Preis
-
vielleicht hatt das schonmal gefragt und ich habes überlesen!
aber wie bekomme ich den pfeis von den Zahlen etwas getrennt ? da dies ja nicht gut aussieht!
die datei ist ja die displayprices das hab ich gefunden ! aber wie bekomm ich da evtl ein leerzeichen rein ? oder muss ich nen anderen Pfeil rein machen ?
-
Moin hab einen Fehler und weiß nicht woran es liegt.
RPT Log
Brauch da glaub ich mal nen denk anstoß.
Code
Alles anzeigenError in expression <py],"life_fnc_update",true,false] spawn life_fnc_MP;> Error position: <life_fnc_MP;> Error Undefined variable in expression: life_fnc_mp File \life_server\Functions\DynMarket\fn_calculatePrices.sqf [TON_fnc_calculatePrices], line 127 Error in expression <[0],"life_fnc_update",true,false] spawn life_fnc_MP; sleep 5; [] spawn TON_fnc_c> Error position: <life_fnc_MP; sleep 5; [] spawn TON_fnc_c> Error Undefined variable in expression: life_fnc_mp File \life_server\Functions\DynMarket\fn_sleeper.sqf [TON_fnc_sleeper], line 13
-