Noch mal neue Logs sind immer gut. Server und Client bitte.
[TUT] Farmboost Script mit MySQL für A3L 5.0.0
-
- Altis Life
-
badidas -
5. Oktober 2019 um 14:21
Hinweis zur Zukunft von Nodezone
Das neue Nodezone befindet sich in der finalen Entwicklungsphase. Mit dem geplanten Start wird das bisherige Forum auf Read Only umgestellt und künftig als Archiv erhalten bleiben.
Alle Informationen zur neuen Plattform, zur Accountübernahme und zum weiteren Ablauf findest du hier: Zum aktuellen Nodezone Beitrag
Das neue Nodezone befindet sich in der finalen Entwicklungsphase. Mit dem geplanten Start wird das bisherige Forum auf Read Only umgestellt und künftig als Archiv erhalten bleiben.
Alle Informationen zur neuen Plattform, zur Accountübernahme und zum weiteren Ablauf findest du hier: Zum aktuellen Nodezone Beitrag
-
-
Hallo, ich habe Folgendes Problem ich habe alles so gemacht wie es mi tut Steht
Code
Alles anzeigenfn_virt_sell.sqf _price = (_price * _amount); if !(isnil "life_farmboost") { if(life_farmboost_A) then { _price = (_price * 1.5); }; if(life_farmboost_B) then { _price = (_price * 1.25); }; };Steht es so drin die Logs sagt folgenden Fehler
Code
Alles anzeigenError in expression < _amount); if !(isnil "life_farmboost") { if(life_farmboost_A) then { _price = > Error position: <{ if(life_farmboost_A) then { _price = > Error Missing ; File core\shops\fn_virt_sell.sqf [life_fnc_virt_sell], line 85 Error in expression < _amount); if !(isnil "life_farmboost") { if(life_farmboost_A) then { _price = > Error position: <{ if(life_farmboost_A) then { _price = > Error Missing ; File core\shops\fn_virt_sell.sqf [life_fnc_virt_sell], line 85zur
Code
Alles anzeigenfn_gather.sqf if (_exit) exitWith {life_action_inUse = false;}; _amount = round(random(_maxGather)) + 1; if !(isnil "life_farmboost") { if(life_farmboost_A) then { _amount = (_amount * 3); }; if(life_farmboost_B) then { _amount = (_amount * 2); }; if(life_farmboost_C) then { _amount = ((_amount * 1.5)); }; };wieder folgender log Fehler
Code
Alles anzeigenError in expression <her)) + 1; if !(isnil "life_farmboost") { if(life_farmboost_A) then { _amount => Error position: <{ if(life_farmboost_A) then { _amount => Error Missing ; File core\actions\fn_gather.sqf [life_fnc_gather], line 111 Error in expression <her)) + 1; if !(isnil "life_farmboost") { if(life_farmboost_A) then { _amount => Error position: <{ if(life_farmboost_A) then { _amount => Error Missing ; File core\actions\fn_gather.sqf [life_fnc_gather], line 111ich hoffe mir kann einer helfen.

-
Edit : Doch nicht, steht im original so drin

-
ich habe es schon so getestet
_amount = ((_amount * 1.5));
und so
_amount = (_amount * 1.5);
die Fehler bleiben
-
ich habe es schon so getestet
_amount = ((_amount * 1.5));
und so
_amount = (_amount * 1.5);
die Fehler bleibenDa fehlt auch noch was:
_amount = round((_amount * 1.5));

-
-
Danke Problem Behoben
-
Habe jetzt leider ein anderes Problem mit diesen script wen man einen code eingeben will kommt ein error in der Client log ist auch der einzigste
C
Alles anzeigenfn_farmboost.sqf #include "..\..\script_macros.hpp" /* File: fn_farmboost.sqf Author: Alex Smith Description: - */ private ["_code"]; params ["_code"]; if (count _code isEqualTo 0) exitWith { hint "Der Code ist ungültig!"; }; //arma is scheiße private _darray = _code select 0; private _selarray = _darray select 3; if (_selarray == "A") then { hint "Der Farmboost (200% Farmen, 200% Verarbeiten) wurde erfolgreich eingelöst! Du kannst den Code nichtmehr benutzen!"; life_farmboost_A = true; publicVariable "life_farmboost_A"; }; if (_selarray == "B") then { hint "Der Farmboost (100% Farmen, 100% Verarbeiten) wurde erfolgreich eingelöst! Du kannst den Code nichtmehr benutzen!"; life_farmboost_B = true; publicVariable "life_farmboost_B"; }; if (_selarray == "C") then { hint "Der Farmboost (50% Farmen, 50% Verarbeiten) wurde erfolgreich eingelöst! Du kannst den Code nichtmehr benutzen!"; life_farmboost_C = true; publicVariable "life_farmboost_C"; }; life_farmboost = true; publicVariable "life_farmboost"; if(!life_farmboost) then { hint "Ein schwerwiegender Fehler ist aufgetreten! Bitte kontaktiere schnellstmöglich einen Admin!"; };Client log sagt
aber nur wen man einen Code Eingeben will und ingame steht da Dein Code wird geprüft
-
Hi habe ein kleines Problem.
Soweit funktioniert alles. active wird in der DB auf 0 gesetzt wird auch in den Logs angezeigt aber dann ist schluss.
Bei mir ruft es die fn_farmboost.sqf nicht auf. Dabei ist sie überall eingetragen.
Gibt leider auch keine Fehler aus.
Hab das gefühl hier hört es auf [_queryResult] remoteExec ["life_fnc_farmboost",_unit];
-
Habe den Fehler gefunden.
Code: fn_getFarmcodes.sqf
Alles anzeigen#include "\life_server\script_macros.hpp" /* File: fn_getFarmcodes.sqf Author: Alex Smith Description: Hör auf zu lesen und kopier schneller! */ private ["_code","_tickTime","_queryResult", "_queryResult2"]; params ["_code", "_unit"]; _query = format ["SELECT id, code, active, type FROM farmkeys WHERE code='%1' AND active='1'",_code]; _tickTime = diag_tickTime; _queryResult = [_query,1] call DB_fnc_asyncCall; diag_log "------------- FARMCODE!! -------------"; diag_log format ["QUERY: %1",_query]; diag_log format ["Time to complete: %1 (in seconds)",(diag_tickTime - _tickTime)]; diag_log format ["Result: %1",_queryResult]; diag_log "------------------------------------------------"; //if (_queryResult isEqualType "") exitWith {}; _queryREM = format ["UPDATE farmkeys SET active='0' WHERE code='%1'",_code]; _queryREMRES = [_queryREM,1] call DB_fnc_asyncCall; diag_log "------------- FARMCODEREMOVE!! -------------"; diag_log format ["QUERY: %1",_queryREM]; diag_log format ["Time to complete: %1 (in seconds)",(diag_tickTime - _tickTime)]; diag_log format ["Result: %1",_queryREMRES]; diag_log "------------------------------------------------"; [_queryResult] remoteExec ["life_fnc_farmboost",_unit];Bei dem _queryResult = [_query,1] call DB_fnc_asyncCall; wird kein wert weitergegeben.
Daher habe ich es zu _queryResult = [_query,2,true] call DB_fnc_asyncCall; gemacht damit die Datenbank auch wieder ein wert zurück gibt.
-