So klappt alles Perfekt, Dankeschön
Beiträge von shriver
-
-
Hallo,
ich wollte über ein Script auf ein Fahrzeug eine Variable geben. Die soll bezwecken, das man das Kennzeichen vom Fahrzeug entfernt hat. Meine fn_kennzeichen.sqf.Nun sagt er mir immer undefinierte Variable in "_fealschungsdata"
Code_vehicle = nearestObject [position player, "LandVehicle"]; _vehicle setVariable ["vehicle_info_fake",true];
Die fn_searchVehAction.sqf
Code
Alles anzeigenprivate ["_vehicle","_data","_faelschungsdata"]; _vehicle = cursorObject; if ((_vehicle isKindOf "Car") || !(_vehicle isKindOf "Air") || !(_vehicle isKindOf "Ship")) then { _owners = _vehicle getVariable "vehicle_info_owners"; if (isNil "_owners") exitWith {hint localize "STR_NOTF_VehCheat"; deleteVehicle _vehicle;}; _faelschungsdata = _vehicle getVariable "vehicle_info_fake"; life_action_inUse = true; hint localize "STR_NOTF_Searching"; sleep 3; life_action_inUse = false; if (player distance _vehicle > 10 || !alive player || !alive _vehicle) exitWith {hint localize "STR_NOTF_SearchVehFail";}; //_inventory = [(_vehicle getVariable "vehicle_info_inv")] call fnc_veh_inv; //if (isNil {_inventory}) then {_inventory = "Nothing in storage."}; _owners = [_owners] call life_fnc_vehicleOwners; if (_owners == "any<br/>") then { _owners = "No owners, impound it<br/>"; }; if (_faelschungsdata) then { _owners = "No owners, impound it<br/>"; }; hint parseText format [localize "STR_NOTF_SearchVeh",_owners]; };
-
Hallo,
ich versuche gerade ein Ace_wheel über die Ace spawnen zu lassen. Dazu habe ich mir die fnc_spawnObject angeschaut. Leider klappt es nicht. Bekomme keine Script fehler, nix.
1. Versucht :
_pos = getpos player
["Ace_wheel", _pos, 0] call ace_repair_fnc_spawnObject;
2. Versuch :
_newwheel = ["ACE_wheel", getPosASL player, 0] call FUNC(spawnObject);
Funktioniert leider beides nicht. Habe es aber nur im Editor probiert. Jemand ne Idee ?
EDIT : Mal wieder mein Fehler, Problem gefunden:
Habe es jetzt so gelöst
_wheel = "Ace_wheel" createVehicle [0,0,0];
_wheel attachTo[player,[0,2.5,0.7]];
_wheel setDir 90;
-
Code
Alles anzeigen#include "\life_server\script_macros.hpp" /* File: fn_queryRequest.sqf Author: Bryan "Tonic" Boardwine Description: Handles the incoming request and sends an asynchronous query request to the database. Return: ARRAY - If array has 0 elements it should be handled as an error in client-side files. STRING - The request had invalid handles or an unknown error and is logged to the RPT. */ private ["_uid","_side","_query","_queryResult","_tickTime","_tmp"]; _uid = [_this,0,"",[""]] call BIS_fnc_param; _side = [_this,1,sideUnknown,[civilian]] call BIS_fnc_param; _ownerID = [_this,2,objNull,[objNull]] call BIS_fnc_param; if (isNull _ownerID) exitWith {}; _ownerID = owner _ownerID; _query = switch (_side) do { // West - 11 entries returned case west: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, cop_licenses, coplevel, cop_gear, blacklist, cop_stats, playtime FROM players WHERE pid='%1'",_uid];}; // Civilian - 12 entries returned case civilian: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, civ_licenses, arrested, civ_gear, civ_stats, civ_alive, civ_position, playtime FROM players WHERE pid='%1'",_uid];}; // Independent - 10 entries returned case independent: {format ["SELECT pid, name, cash, bankacc, adminlevel, donorlevel, med_licenses, mediclevel, med_gear, med_stats, playtime FROM players WHERE pid='%1'",_uid];}; }; _tickTime = diag_tickTime; _queryResult = [_query,2] call DB_fnc_asyncCall; if (EXTDB_SETTING(getNumber,"DebugMode") isEqualTo 1) then { diag_log "------------- Client Query Request -------------"; 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 { [] remoteExecCall ["SOCK_fnc_insertPlayerInfo",_ownerID]; }; if (count _queryResult isEqualTo 0) exitWith { [] remoteExecCall ["SOCK_fnc_insertPlayerInfo",_ownerID]; }; //Blah conversion thing from a2net->extdb _tmp = _queryResult select 2; _queryResult set[2,[_tmp] call DB_fnc_numberSafe]; _tmp = _queryResult select 3; _queryResult set[3,[_tmp] call DB_fnc_numberSafe]; //Parse licenses (Always index 6) _new = [(_queryResult select 6)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format ["%1", _new];}; _queryResult set[6,_new]; //Convert tinyint to boolean _old = _queryResult select 6; for "_i" from 0 to (count _old)-1 do { _data = _old select _i; _old set[_i,[_data select 0, ([_data select 1,1] call DB_fnc_bool)]]; }; _queryResult set[6,_old]; _new = [(_queryResult select 8)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format ["%1", _new];}; _queryResult set[8,_new]; //Parse data for specific side. switch (_side) do { case west: { _queryResult set[9,([_queryResult select 9,1] call DB_fnc_bool)]; //Parse Stats _new = [(_queryResult select 10)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format ["%1", _new];}; _queryResult set[10,_new]; //Playtime _new = [(_queryResult select 11)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format ["%1", _new];}; _index = TON_fnc_playtime_values_request find [_uid, _new]; if (_index != -1) then { TON_fnc_playtime_values_request set[_index,-1]; TON_fnc_playtime_values_request = TON_fnc_playtime_values_request - [-1]; TON_fnc_playtime_values_request pushBack [_uid, _new]; } else { TON_fnc_playtime_values_request pushBack [_uid, _new]; }; [_uid,_new select 0] call TON_fnc_setPlayTime; }; case civilian: { _queryResult set[7,([_queryResult select 7,1] call DB_fnc_bool)]; //Parse Stats _new = [(_queryResult select 9)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format ["%1", _new];}; _queryResult set[9,_new]; //Position _queryResult set[10,([_queryResult select 10,1] call DB_fnc_bool)]; _new = [(_queryResult select 11)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format ["%1", _new];}; _queryResult set[11,_new]; //Playtime _new = [(_queryResult select 12)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format ["%1", _new];}; _index = TON_fnc_playtime_values_request find [_uid, _new]; if (_index != -1) then { TON_fnc_playtime_values_request set[_index,-1]; TON_fnc_playtime_values_request = TON_fnc_playtime_values_request - [-1]; TON_fnc_playtime_values_request pushBack [_uid, _new]; } else { TON_fnc_playtime_values_request pushBack [_uid, _new]; }; [_uid,_new select 2] call TON_fnc_setPlayTime; /* Make sure nothing else is added under here */ _houseData = _uid spawn TON_fnc_fetchPlayerHouses; waitUntil {scriptDone _houseData}; _queryResult pushBack (missionNamespace getVariable [format ["houses_%1",_uid],[]]); _gangData = _uid spawn TON_fnc_queryPlayerGang; waitUntil{scriptDone _gangData}; _queryResult pushBack (missionNamespace getVariable [format ["gang_%1",_uid],[]]); }; case independent: { //Parse Stats _new = [(_queryResult select 9)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format ["%1", _new];}; _queryResult set[9,_new]; //Playtime _new = [(_queryResult select 10)] call DB_fnc_mresToArray; if (_new isEqualType "") then {_new = call compile format ["%1", _new];}; _index = TON_fnc_playtime_values_request find [_uid, _new]; if !(_index isEqualTo -1) then { TON_fnc_playtime_values_request set[_index,-1]; TON_fnc_playtime_values_request = TON_fnc_playtime_values_request - [-1]; TON_fnc_playtime_values_request pushBack [_uid, _new]; } else { TON_fnc_playtime_values_request pushBack [_uid, _new]; }; [_uid,_new select 1] call TON_fnc_setPlayTime; }; }; publicVariable "TON_fnc_playtime_values_request"; _keyArr = missionNamespace getVariable [format ["%1_KEYS_%2",_uid,_side],[]]; _queryResult pushBack _keyArr; _queryResult remoteExec ["SOCK_fnc_requestReceived",_ownerID];
-
Don "fn_updateRequest" in zeile 46 steht nicht in unserer Datei. Ist wohl beim kopieren rein gekommen. Jay Kuchenplatte der Fehler :
Spoiler anzeigen
- [16:43:59:893211 +02:00] [Thread 5680] extDB3: Output to Server: [0,"Error MariaDBQueryException Exception"]
- [16:44:01:588886 +02:00] [Thread 5680] extDB3: Input from Server: 1:7010:UPDATE players SET name='[869] Shriver Basdekis', cash='0', bankacc='5000', civ_licenses='"[[`license_civ_staatsbuergerschaft`,0],[`license_civ_driver`,0],[`license_civ_boat`,0],[`license_civ_pilot`,0],[`license_civ_trucking`,0],[`license_civ_gun`,0],[`license_civ_dive`,0],[`license_civ_home`,0],[`license_civ_himbeersaft`,0],[`license_civ_chips`,0],[`license_civ_mehl`,0],[`license_civ_broetchen`,0],[`license_civ_sushi`,0],[`license_civ_kupfer`,0],[`license_civ_eisen`,0],[`license_civ_stahl`,0],[`license_civ_platin`,0],[`license_civ_diamat`,0],[`license_civ_gold`,0],[`license_civ_schmuck`,0],[`license_civ_benzin`,0],[`license_civ_plastik`,0],[`license_civ_schaltkreise`,0],[`license_civ_cola`,0],[`license_civ_bier`,0],[`license_civ_kornbrand`,0],[`license_civ_wodka`,0],[`license_civ_himbeerwodka`,0],[`license_civ_mohnbroetchen`,0],[`license_civ_haze`,0],[`license_civ_koks`,0],[`license_civ_heroin`,0],[`license_civ_LSD`,0],[`license_civ_shiningmoon`,0]]"', civ_gear='"[`U_C_Poloshirt_stripped`,``,``,``,``,[`ItemMap`,`ItemCompass`,`Itemwatch`],``,``,[],[],[],[],[],[],[``,``,``,``],[``,``,``,``],[]]"', arrested='1', civ_stats='"[0]"', civ_alive='0', civ_position='"[]"', playtime='"[]"' WHERE pid='76561198107872048'
ExtDB 17-50-12.log
ExtDB .TXT : 17-50-12.txt
-
-
Moin,
ich habe ein Problem in meine RPT Logs.
Sieht so aus :
Code18:41:43 Error position: <life_cash,life_atmbank]; _array = []; _a> 18:41:43 Error Undefined variable in expression: life_cash 18:41:43 File core\session\fn_updateRequest.sqf [SOCK_fnc_updateRequest], line 76
arma3server_2017-08-02_18-00-10.rpt
Die UpdateRequet
Code
Alles anzeigen#include "..\..\script_macros.hpp" /* File: fn_updateRequest.sqf Author: Tonic Description: Passes ALL player information to the server to save player data to the database. */ private ["_packet","_array","_flag","_alive","_position"]; _packet = [getPlayerUID player,(profileName),playerSide,CASH,BANK]; _array = []; _alive = alive player; _position = getPosATL player; _flag = switch (playerSide) do {case west: {"cop"}; case civilian: {"civ"}; case independent: {"med"};}; { _varName = LICENSE_VARNAME(configName _x,_flag); _array pushBack [_varName,LICENSE_VALUE(configName _x,_flag)]; } forEach (format ["getText(_x >> 'side') isEqualTo '%1'",_flag] configClasses (missionConfigFile >> "Licenses")); _packet pushBack _array; [] call life_fnc_saveGear; _packet pushBack life_gear; _array = []; _array pushBack life_hunger; _array pushBack life_thirst; _array pushBack (damage player); _packet pushBack _array; switch (playerSide) do { case civilian: { _packet pushBack life_is_arrested; _packet pushBack _alive; _packet pushBack _position; }; }; if (life_HC_isActive) then { _packet remoteExecCall ["HC_fnc_updateRequest",HC_Life]; } else { _packet remoteExecCall ["DB_fnc_updateRequest",RSERV]; }; fn_updateRequest
-
Läuft leider auch nicht, spawne immer unten Links an der Karte [o,o,o] oder Sterbe... Kann mir jemand helfen ? RPT : arma3server_2017-07-28_22-47-45.rpt
EDIT : Außerdem verschwindet der Slot, bei der Slotauswahl.
-
Aber wie ? Sorry für die dumme Frage
Code
Alles anzeigenif !(params[["_dictionary",[],[[],0,""]]]) exitWith {}; scopeName "main"; { if (worldName == _x select 0) then { (_x select 1) breakOut "main"; }; } count _dictionary; switch (typeOf (_dictionary select 0 select 1)) do { case "ARRAY": {[]}; case "STRING": {""}; case "SCALAR": {-1}; };
-
Hallo liebe Community,
Ich hab versucht einen Jackson County Server zu erstellen. Also Mission-name geändert von Tanoa zu Jackson_County, Config_Spawnpoints angepasst & Alles von der Tanoa Life Karte auf die Jackson County Karte gezogen. Funktioniert aber leider nicht, habe nur nen Blackscreen.
-
So, habe den Fehler wohl gefunden. Habe mir mal alte Dateien aus der 4.0 angeschaut und mit der 5.0 verglichen. so sieht die Broadcast aus :
Code
Alles anzeigenif (_type isEqualType []) then { for "_i" from 0 to (count _type)-1 do { switch (_type select _i) do { case 0: {systemChat _message}; case 1: {hint format ["%1", _message]}; case 2: {titleText[format ["%1",_message],"PLAIN"];}; }; }; } else { switch (_type) do { case 0: {systemChat _message}; case 1: {hint format ["%1", _message]}; case 2: {titleText[format ["%1",_message],"PLAIN"];}; }; };
Nun habe ich mit :
Case 1 angesteuert. Da mein hint aber kein "hint format" ist, sondern ein hint parseText format , kann dies denke ich nicht funktionieren. Also einfach nen neuen Case einfügen :
Ich hoffe das es jetzt bei mir funktioniert, wenn ihr einen Fehler findet, gebt mir bitte Bescheid !
-
Nein funktioniert leider auch nicht, ich versuche es jetzt mal über die life_server zu machen.
-
Aber dann kommt da nix , keine Scriptfehler etc...
-
Klappt leider auch so nicht :
[1,hint parseText format["<t color='#c45454' size='2'>Ladeneröffnung</t><br/><br/><br/><t size='1'><t color='#33CC33'>Ladenname: <t color='#c45454'>%1<br/><t color='#33CC33'>Besitzer: <t color='#ffffff'>%2<br/><t color='#33CC33'>Position: <t color='#ffffff'>%3<br/><t color='#33CC33'>Nachricht:<br/><t color='#ffffff'>%4",_Header, name player, mapGridPosition player, _Message],false] remoteExec ["life_fnc_broadcast",civilian];
Hatte das Script früher schon mal in der 4.4 versucht. Da hats geklappt, aber in der 5.0 klappt das :
Spoiler anzeigen
aus dem Script : [Tutorial] Banken | by Brizi Jaeger klappt auch nicht !
-
Jetzt bekomme ich nix mehr... Liegt es daran das der hint fehlt ?
1,hint parseText format
-
Moin, ich habe versucht einen Hint an Zivilisten geben zu lassen, dies ohne es in der life_server zu machen. Die Idee habe ich von diesem Script : [Tutorial] Banken | by Brizi Jaeger
Bei mir funktioniert das leider nicht, sieht so aus :
Codehint parseText format["<t color='#c45454' size='2'>Ladeneröffnung</t><br/><br/><br/><t size='1'><t color='#33CC33'>Ladenname: <t color='#c45454'>%1<br/><t color='#33CC33'>Besitzer: <t color='#ffffff'>%2<br/><t color='#33CC33'>Position: <t color='#ffffff'>%3<br/><t color='#33CC33'>Nachricht:<br/><t color='#ffffff'>%4",_Header, name player, mapGridPosition player, _Message] remoteExec ["life_fnc_broadcast",civilian];
-
Wow, mein Fehler... Hab es mal eingefügt und schau ob es jetzt klappt
-
-
-
Ist jetzt nicht ein gut gemachter Dialog , aber da habe ich trotzdem Zeit reingesteckt und ich will nicht das man ihn verwendet ohne meine Erlaubnis...