- Logdateien zur Fehleranalyse
- Ja, ich habe Logdateien meines Servers hochgeladen
Moin Moin,
ich bin sonst eigentlich hier nur der stille Mitleser, aber aktuell stehe ich irgendwie auf dem Schlauch... ein simples Datenbankupdate raubt mir zur Zeit den Nerv.
Möchte gerne folgende Funktion für das DB Update nutzen, da diese auch in sämtlichen anderes Scripts ohne Probleme genutzt wird... Da ich dachte, ich hätte irgendwas bei den Variablen vertauscht, habe ich mir die Variablen im SystemChat ausgegeben - Das passt soweit alles.
Code
_query = format ["UPDATE vehicles SET chip='%3' WHERE pid='%1' AND plate='%2'",_owner , _plate, _chip];
_thread = [_query,2] call DB_fnc_asyncCall;
Das komplette Script:
Code: fn_tuningkit_V4.sqf
#include "..\..\script_macros.hpp"
/*
File: fn_tuningkit_V4.sqf
Author: Harry Knueller
Description:
Tuningchip for edit acceleration and maxspeed.
*/
private ["_vehicle","_chip","_thread","_cpRate","_title","_progressBar","_titleText","_cp","_ui","_plate","_owner"];
_vehicle = cursorObject;
_vehInfo = _vehicle getVariable ["dbinfo",[]];
_vehChip = _vehicle getVariable ["chip",[]];
_owner = _vehInfo select 0;
_plate = _vehInfo select 1;
if (isNull cursorObject) exitWith {["Aktion","Wo soll der Chip eingebaut werden?","error"] spawn cplus_notification_fnc_notification;};
if (player distance _vehicle > 5) exitWith {["Aktion","Du bist zu weit vom Fahrzeug weg!","error"] spawn cplus_notification_fnc_notification;};
if (!(_vehicle isKindOf "car")) exitWith {["Aktion","Der Chip kann nicht an diesem Fahrzeugtypen angebracht werden!","error"] spawn cplus_notification_fnc_notification;};
if (count _vehInfo isEqualTo 0) exitWith {["Aktion","Der Chip kann nicht an einem Mietfahrzeug angebracht werden!","error"] spawn cplus_notification_fnc_notification;};
//if (playerSide in [independent, west]) exitWith {["Aktion","Du kannst diesen Chip nicht verwenden!","error"] spawn cplus_notification_fnc_notification;};
if (!(_owner isEqualto getPlayerUid player)) exitWith {["Aktion","Das ist nicht dein Fahrzeug!","error"] spawn cplus_notification_fnc_notification;};
if (!(alive _vehicle)) exitWith {["Aktion","Das Fahrzeug ist zerstört","error"] spawn cplus_notification_fnc_notification;};
if (_vehChip > 0) exitWith {["Aktion","Du musst den bereits montierten Chip ausbauen!","error"] spawn cplus_notification_fnc_notification;};
if (life_inv_tuningkit_V4 < 1) exitWith {["EXPLOIT","Bugusing ist strengstens verboten!","error"] spawn cplus_notification_fnc_notification;};
life_action_inUse = true;
disableSerialization;
_title = "Chip wird montiert...";
"progressBar" cutRsc ["life_progress","PLAIN"];
_ui = uiNamespace getVariable "life_progress";
_progressBar = _ui displayCtrl 38201;
_titleText = _ui displayCtrl 38202;
_titleText ctrlSetText format ["%2 (1%1)...","%",_title];
_progressBar progressSetPosition 0.01;
_cP = 0.01;
_cpRate = 0.0036;
for "_i" from 0 to 1 step 0 do {
if (animationState player != "AinvPknlMstpSnonWnonDnon_medic_1") then {
[player,"AinvPknlMstpSnonWnonDnon_medic_1",true] remoteExecCall ["life_fnc_animSync",RCLIENT];
player switchMove "AinvPknlMstpSnonWnonDnon_medic_1";
player playMoveNow "AinvPknlMstpSnonWnonDnon_medic_1";
};
uiSleep 0.18;
if (isNull _ui) then {
"progressBar" cutRsc ["life_progress","PLAIN"];
_ui = uiNamespace getVariable "life_progress";
_progressBar = _ui displayCtrl 38201;
_titleText = _ui displayCtrl 38202;
};
_cP = _cP + _cpRate;
_progressBar progressSetPosition _cP;
_titleText ctrlSetText format ["%3 (%1%2)...",round(_cP * 100),"%",_title];
if (_cP >= 1 || !alive player) exitWith {};
if (life_istazed) exitWith {};
if (life_isknocked) exitWith {};
if (life_interrupted) exitWith {};
};
"progressBar" cutText ["","PLAIN"];
player playActionNow "stop";
if (!alive player || life_istazed || life_isknocked) exitWith {};
if (player getVariable ["restrained",false]) exitWith {};
if (life_interrupted) exitWith {life_interrupted = false; titleText[localize "STR_NOTF_ActionCancel","PLAIN"]; life_action_inUse = false;};
life_action_inUse = false;
_vehicle setVariable ["chip",4,true];
[false,"tuningkit_V4",1] call life_fnc_handleInv;
["Aktion","Du hast den Chip am Fahrzeug montiert!","success"] spawn cplus_notification_fnc_notification;
_chip = _vehicle getVariable ["chip",[]];
systemChat format["UID: %1 - Kennzeichen: %2 - Chip: %3", _owner, _plate, _chip];
_query = format ["UPDATE vehicles SET chip='%3' WHERE pid='%1' AND plate='%2'",_owner , _plate, _chip];
_thread = [_query,2] call DB_fnc_asyncCall;
Alles anzeigen
.rpt - Ausschnitt
Code
_thread = [_query,2] call DB_fnc_asyncCall;>
7:48:42 Error position: <DB_fnc_asyncCall;>
7:48:42 Error Nicht definierte Variable in Ausdruck: db_fnc_asynccall
7:48:42 File mpmissions\__CUR_MP.Altis\core\items\fn_tuningkit_V4.sqf..., line 78
Ich hoffe, ihr könnt mir weiter helfen.
Liebe Grüße