Jump to content

arconymous

Member
  • Content Count

    8
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About arconymous

  • Rank
    Private

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Thanks for your replies. I've tested it again with a shorter script, based on this tutorial: https://forums.bistudio.com/topic/175660-tutorial-server-side-scripting/ test.VR\init.sqf if(isServer) then { [] execVM "TestServerSide\init.sqf"; }; _player = player; _name = name player; [["newPlayer",_name], savename, false] call BIS_fnc_MP; TestServerSide\init.sqf //Datenbankverbindung herstellen diag_log "SURV_SERVER: DATENBANKVERBINDUNG WIRD HERGESTELLT!"; [] execVM "TestServerSide\database\connectDB.sqf"; diag_log "SURV_SERVER: SYNCHRONISIERUNGSFUNKTIONEN WERDEN INITIIERT!"; [] execVM "TestServerSIde\database\callDB.sqf"; The connection works. TestServerSide\database\callDB.sqf savename = { _call = _this select 0; _name = _this select 1; call compile ("extDB2" callExtension format["1:%1:%2:%3", (call extDB_SQL_CUSTOM_ID), _call, _name); }; That is everything... But it wouldn't work my arma3.ini for extDB: [newPlayer] SQL1_1 = INSERT INTO SQL1_2 = players (name) SQL1_3 = VALUES SQL1_4 = (?) SQL1_INPUTS = 1 Number of Inputs = 1 No errors in the logs... Edit: It works now... Just a few syntax errors
  2. Hello, sorry for my english, im not a native english speaker... I've a problem with my scripts. It's a test mission, which can save the players position with extDB2. It works only for the first player who joins the game, the second is unabailable to create, update or load data. Sorry, i haven't found a Spoiler-function to minimize the codes. Here are the files: Testworld.VR\init.sqf //Speichern und Autospeichern verbieten enableSaving [false, false]; //Datenbankverbindung herstellen diag_log "SERVER: Datenbankverbindung wird hergestellt"; _ready = [] execVM "scripts\database\connectDB.sqf"; waitUntil {scriptDone _ready}; //Laden der Masterfile diag_log "SERVER: Masterfile wird geladen"; _ready = [] execVM "scripts\master.sqf"; waitUntil {scriptDone _ready}; if (isDedicated) then { } else { [player] execVM "scripts\playerinit.sqf"; }; Testworld.VR\scripts\master.sqf //Funktion zum Callen mit der DB erstellen Arco_fnc_dbCall = compileFinal preprocessFileLineNumbers "scripts\database\callDB.sqf"; Arco_fnc_newPlayer = compileFinal preprocessFileLineNumbers "scripts\database\fnc\newPlayer.sqf"; Arco_fnc_updatePlayer = compileFinal preprocessFileLineNumbers "scripts\database\fnc\updatePlayer.sqf"; Arco_fnc_loadPlayer = compileFinal preprocessFileLineNumbers "scripts\database\fnc\loadPlayer.sqf"; publicVariable "Arco_fnc_dbCall"; publicVariable "Arco_fnc_newPlayer"; publicVariable "Arco_fnc_updatePlayer"; publicVariable "Arco_fnc_loadPlayer"; Testworld.VR\scripts\playerinit.sqf _player = [_this, 0, objNull, [objNull]] call BIS_fnc_param; _player addAction ["Create Record", {[player,"newPlayer"] call Arco_fnc_dbCall}]; _player addAction ["Update Record", {[player,"updatePlayer"] call Arco_fnc_dbCall}]; _player addAction ["Load Record", {[player, "loadPlayer"] call Arco_fnc_dbCall}]; _player addAction ["Virtual Arsenal", {["Open",true] spawn BIS_fnc_arsenal}]; Testworld.VR\scripts\database\callDB.sqf private["_player","_call","_steamid"]; _player = [_this, 0, objNull, [objNull]] call BIS_fnc_param; _call = [_this, 1, 0, []] call BIS_fnc_param; switch (_call) do { case "newPlayer" : {[_player, _call] call Arco_fnc_newPlayer}; case "updatePlayer" : {[_player, _call] call Arco_fnc_updatePlayer}; case "loadPlayer" : {[_player, _call] call Arco_fnc_loadPlayer}; default {"false"}; }; Testworld.VR\scripts\database\connectDB.sqf private["_database","_protocol","_protocol_options","_return","_result","_random_number","_extDB_SQL_CUSTOM_ID"]; _database = "arma3"; _protocol = "SQL_CUSTOM_V2"; _protocol_options = "arma3"; _return = false; if ( isNil {uiNamespace getVariable "extDB_SQL_CUSTOM_ID"}) then { // extDB Version _result = "extDB2" callExtension "9:VERSION"; diag_log format ["extDB2: Version: %1", _result]; if(_result == "") exitWith {diag_log "extDB2: Failed to Load"; false}; //if ((parseNumber _result) < 20) exitWith {diag_log "Error: extDB version 20 or Higher Required";}; // extDB Connect to Database _result = call compile ("extDB2" callExtension format["9:ADD_DATABASE:%1", _database]); if (_result select 0 isEqualTo 0) exitWith {diag_log format ["extDB2: Error Database: %1", _result]; false}; diag_log "extDB2: Connected to Database"; // Generate Randomized Protocol Name _random_number = round(random(999999)); _extDB_SQL_CUSTOM_ID = str(_random_number); extDB_SQL_CUSTOM_ID = compileFinal _extDB_SQL_CUSTOM_ID; // extDB Load Protocol _result = call compile ("extDB2" callExtension format["9:ADD_DATABASE_PROTOCOL:%1:%2:%3:%4", _database, _protocol, _extDB_SQL_CUSTOM_ID, _protocol_options]); if ((_result select 0) isEqualTo 0) exitWith {diag_log format ["extDB2: Error Database Setup: %1", _result]; false}; diag_log format ["extDB2: Initalized %1 Protocol", _protocol]; // extDB2 Lock "extDB2" callExtension "9:LOCK"; diag_log "extDB2: Locked"; // Save Randomized ID uiNamespace setVariable ["extDB_SQL_CUSTOM_ID", _extDB_SQL_CUSTOM_ID]; _return = true; } else { extDB_SQL_CUSTOM_ID = compileFinal str(uiNamespace getVariable "extDB_SQL_CUSTOM_ID"); diag_log "extDB2: Already Setup"; _return = true; }; _return Testworld.VR\scripts\database\fnc\loadPlayer.sqf private["_player", "_call", "_steamid"]; _player = [_this, 0, objNull, [objNull]] call BIS_fnc_param; _call = [_this, 1, 0, []] call BIS_fnc_param; _steamid = getPlayerUID _player; //DB-Anfrage _loadplayerreturn = "extDB2" callExtension format["0:%1:%2:%3", (call extDB_SQL_CUSTOM_ID), _call, _steamid]; //Formatierung der Antwort der DB _playerreturnconv1 = _loadplayerreturn splitString ",[]"; _mydataarray = _playerreturnconv1 - ["1"]; //Auswählen der benötigten Array-Felder _cx = _mydataarray select 0; _cy = _mydataarray select 1; _cz = _mydataarray select 2; _dir = _mydataarray select 3; _uniform = _mydataarray select 4; _vest = _mydataarray select 5; _headgear = _mydataarray select 6; _goggles = _mydataarray select 7; _backpack = _mydataarray select 8; //Convertieren der Daten von String zu Number _coordx = parseNumber _cx; _coordy = parseNumber _cy; _coordz = parseNumber _cz; _vdir = parseNumber _dir; //Position und Blickrichtung festlegen _player setPos [_coordx, _coordy, _coordz]; _player setDir _vdir; //Inventar löschen removeAllweapons player; removeAllAssignedItems player; removebackpack player; removeVest player; removeUniform player; removeHeadGear player; //Spieler ausrüsten player addUniform _uniform; player addVest _vest; player addHeadgear _headgear; player addGoggles _goggles; player addBackpack _backpack; Testworld.VR\scripts\database\fnc\newPlayer.sqf _player = [_this, 0, objNull, [objNull]] call BIS_fnc_param; _call = [_this, 1, 0, []] call BIS_fnc_param; _name = name _player; _steamid = getPlayerUID _player; _dir = getDir _player; _pos = getPos _player; _posx = _pos select 0; _posy = _pos select 1; _posz = _pos select 2; _uni = uniform _player; _vest = vest _player; _headgear = headgear _player; _goggles = goggles _player; _backpack = backpack _player; "extDB2" callExtension format["1:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12:%13", (call extDB_SQL_CUSTOM_ID), _call, _name, _steamid, _posx, _posy, _posz, _dir, _uni, _vest, _headgear, _goggles, _backpack]; Testworld.VR\scripts\database\fnc\updatePlayer.sqf _player = [_this, 0, objNull, [objNull]] call BIS_fnc_param; _call = [_this, 1, 0, []] call BIS_fnc_param; _name = name _player; _steamid = getPlayerUID _player; _dir = getDir _player; _pos = getPos _player; _posx = _pos select 0; _posy = _pos select 1; _posz = _pos select 2; _uni = uniform _player; _vest = vest _player; _headgear = headgear _player; _goggles = goggles _player; _backpack = backpack _player; "extDB2" callExtension format["1:%1:%2:%3:%4:%5:%6:%7:%8:%9:%10:%11:%12", (call extDB_SQL_CUSTOM_ID), _call, _posx, _posy, _posz, _dir, _uni, _vest, _headgear, _goggles, _backpack, _steamid]; I hope, there is a nice guy who reads through it and can help me :) Thanks!
  3. Hello, now, its working, the problem was, i was using one texture instead of 4
  4. Now, i've tested it again for 3 times, and get black textures
  5. Hello, i have some problems with the terrain builder or buldozer. Everytime, when i create a second mapframe, generate the layers and go into the buldozer, the textures goes from sat-image to black, while zooming in. I followed captncaps' tutorial : https://www.youtube.com/watch?v=9ZJmUb1eZpo Here are my files: layers.cfg class Layers { class grass_green { texture = ""; material = "Arco\myterrain\data\gdt_grass_green.rvmat"; }; }; class Legend { picture = "Arco\myterrain\source\mapLegend.png"; class Colors { grass_green[] = {{0,255,0}}; }; }; gdt_grass_green.rvmat ambient[]={1.5,1.5,1.5,1}; diffuse[]={0.5,0.5,0.5,1}; forcedDiffuse[]={0,0,0,0}; emmisive[]={0,0,0,0}; specular[]={0,0,0,0}; specularPower=1; PixelShaderID="NormalMapDiffuse"; VertexShaderID="NormalMapDiffuseAlpha"; class Stage1 { texture="Arco\myterrain\data\gdt_grass_green_nopx.paa"; uvSource="tex"; class uvTransform { aside[]={10,0,0}; up[]={0,10,0}; dir[]={0,0,10}; pos[]={0,0,0}; }; }; class Stage2 { texture="Arco\myterrain\gdt_grass_green_co.paa"; uvSource="tex"; class uvTransform { aside[]={10,0,0}; up[]={0,10,0}; dir[]={0,0,10}; pos[]={0,0,0}; }; }; Every file can be found at the directory that is in the code. Please help me, i'll freak out with this problem :/ p.s. sorry for my bad english, i hope everything is understandable. Arconymous
  6. I get it running, but now it saves nothing to the ini file except this: [pdw] pdw_unit_="[[0,0,0],0,0,0]" pdw_inventory_Error: No vehicle="["","","",<null>,"",<null>,"",<null>,"",<null>,[],"",<null>,[],"",<null>,[],<null>]" My rpt shows this:
  7. Hello, first, sorry for my english, its not my native language. After hours of spending time on scripting on my server, ive some problems with iniDbi. I get OO PDW running in the editor and in a local lan game. But when i try to install iniDbi and OO PDW on my dedicated server it won't work. I followed the readme and search some threads in scripting forums. Step 0: Downloaded inidbi here: https://github.com/code34/-inidbi Step 1: Put @inidbi into the missions root folder where arma3server.exe is and the other mods i want to run on my server. Step 2: The folder in \@inidbi\Addons i've converted into a pbo. Step 3: Then ive call the "\inidbi\init.sqf"; in my init.sqf in the section "if (isServer) then {};" to make it running only on the server and not at the clients. When i run it at other sections like if (hasInterface) then {}; then i get the error script "inidbi/init.sqf" not found. That works perfectly but now the problems starts: Step 4: Downloaded oo_pdw here: https://github.com/code34/oo_pdw.Altis Step 5: Copy the files "oo_pdw.sqf" and "oop.h" in my mission directory Step 6: Adding call to run "oo_pdw.sqf" into my "init.sqf" But where? in "if (isServer) then {};" the clients cant use the following scripts and in other sections i always get the message "PDW: Requires iniDbi" Main installation is completed now. To save i try to use the content from the initServer.sqf : The hints appears, clearInventory and setPos works. Thats all. I dunno where to put all these codes to get it running serverside, that everyone who joins my mission get his old gear and position. Ive tested maybe ten possibilites ( content from initServer.sqf in init.sqf under isServer or hasInterface , or call \inidbi\init.sqf in a different section or in initServer.sqf.) If I run it clientside i get the error \inidbi\init.sqf not found, when i install everything serverside the server doesn't save anything into @inidbi\db. I made a new topic because to my mind it really difficult to understand it , where to put this codes and so on. I dont want to spam code34 topic. I hope its not complety incomprehensible and that you can help my with this issue. Arconymous
  8. Hey code34, sorry for my english, its not my native language... I have some problems with your example mission. The functions work when you call them from the initServer.sqf, but from every different sqf's they won't run. I create a addAction.sqf and call it via the initServer.sqf This is in the file. Everytime i activate the action in the actionmenu the hint is shown, but the function read nothing from the created mydb.ini . Hope you can help me :) Edit: I just want to test it with the loadPlayer function, i know , that i need loadInventory to get the players inventory 2nd Edit: IT WORKS , for everyone who have the same problem you need to define the variable like this in the addAction: Thank you code34 for this awesome things.
×