pliskin124
Member-
Content Count
149 -
Joined
-
Last visited
-
Medals
Everything posted by pliskin124
-
inidbi2 - Windows 10 Compatibility Question
pliskin124 posted a topic in ARMA 3 - SERVERS & ADMINISTRATION
inidbi2 has been writing / reading successfully from the database when the game is launched locally, however when I place it onto the Dedicated server (running on windows 10) it will not create the databases. My question is, does it require a windows server OS, or am I missing some crucial step here regarding the DLL? I have launched the server with -filepatching and attempted to authorize the rule on DLL. The readme reads: However I am not seeing any way to authorize it in Windows 10 and I am wondering if this only applies to servers. Thanks for any assistance. The following link is the mission file if anyone has any thoughts: GearPersistence.VR -
Thanks for reading my thread! I am trying to create a script that will disable a players Escape button options while they are serving jail time for friendly fire, then re-enable it once the cell door opens. This is to prevent them just respawning and circumventing their punishment. I have searched through the forums and cannot find an option that actually works. I do not want to disable all of the players input so they can look out the window and communicate with others should they wish to see them. Here is the current script which teleports the player to the jail cell and makes them sit for 5 minutes following their killing of a friendly unit: playMusic "gameIntro"; titleText ["Court Martial!","BLACK OUT",3]; player setPos (getPos Cell1); Jail1 animate ["door_2_rot",0]; removeAllWeapons player; removeAllItems player; removeAllAssignedItems player; removeVest player; removeBackpack player; removeHeadgear player; removeGoggles player; removeUniform player; player forceAddUniform "U_C_WorkerCoveralls"; titleText ["You must serve 5 minutes in jail","BLACK IN",4]; sleep 300; enableSerialization; if (!alive player) then {((findDisplay 49) displayctrl 104) ctrlShow true;}; titleText ["Jail Time Served","WHITE IN",4]; Jail1 animate ["door_2_rot",1]; player addRating 2000; Any assistance would be appreciated.
-
Disabling Escape Button Options
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Figured it out. Full script for anyone interested in a friendly fire script. Credit to pierremgi for assisting in DM's! Create a ME Guard House from CUP with the jail cell, name it Jail 1, create an invisible helper object in the cell name it Cell1 Trigger Condition: (rating player) < -1000 On Activation: nul = ExecVM "FriendlyFire.sqf"; titleText ["Court Martial!","BLACK OUT",3]; player setPos (getPos Cell1); player setVariable ["inJail", true]; [] spawn { waitUntil {!isNull findDisplay 46}; findDisplay 46 displayAddEventHandler ["keyDown",{ params ["_ctrl","_key"]; if (!(player getVariable ["inJail",TRUE])) then {findDisplay 46 displayRemoveEventHandler ["keyDown",_thisEventHandler]}; private _h = false; if (_key == 1) then {_h = true}; _h }] }; Jail1 animate ["door_2_rot",0]; removeAllWeapons player; removeAllItems player; removeAllAssignedItems player; removeVest player; removeBackpack player; removeHeadgear player; removeGoggles player; removeUniform player; player forceAddUniform "U_C_WorkerCoveralls"; titleText ["You must serve 2 minutes in jail","BLACK IN",4]; sleep 120; player setVariable ["inJail", false]; titleText ["Jail Time Served","WHITE IN",4]; Jail1 animate ["door_2_rot",1]; player addRating 2000; -
Disabling Escape Button Options
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Yeah I came across one of your old posts in the past but it didn't seem to work. The one above seems to be working I just can't for the life of me figure out how to re-enable the escape key -
Disabling Escape Button Options
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
0 = [] spawn { waitUntil {!isNull findDisplay 46}; findDisplay 46 displayAddEventHandler ["keyDown",{ params ["_ctrl","_key"]; private _h = false; if (_key == 156) then {_h = true}; _h }] }; Managed to dig around and find a solution for disabling the key... However I need to re-enable the escape key once the timer is up. Suggestions? -
Shock's Redressing Script
pliskin124 replied to jshock's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Does anyone still have an archived version of this since Armaholic went down? -
Applying Waypoints to Dynamically Spawned units on Headless Client
pliskin124 posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Okay, the short and sweet run down. My headless client is deleting the waypoints that are created by the dynamically spawning AI script. The AI are being spawned by a script in a PBO and I would prefer not to have to unpack the mod and reupload it with alterations, the simplest method for me is to create a script on a trigger once any EAST units are detected within the trigger area to move to the waypoint "Base" This is what I have so far, but it's not working Trigger is named AzovTrigger Condition: Opfor Activation Type: Present Repeatable: Yes {if ((_x != player) && {(side _x) == east && {_x distance AzovTrigger <= ((triggerArea AzovTrigger) select 0)}}) then _x doMove(getMarkerPos "Base"); forEach allUnits Any and all assistance would be appreciated- 2 replies
-
- headless client
- waypoint
-
(and 1 more)
Tagged with:
-
Applying Waypoints to Dynamically Spawned units on Headless Client
pliskin124 replied to pliskin124's topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Unfortunately it appears I was mistaken. After testing this live on the dedicated server the AI still sit there and do nothing when transferred to the headless... Works fine on the editor without a headless client, still can't figure out how to issue the command to the headless controlled units. Any help would be appreciated- 2 replies
-
- headless client
- waypoint
-
(and 1 more)
Tagged with:
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hi there, Thank you for taking the time to look at my post. I am trying to save the players location data into the idbi2 database. I have the Gear, Name, and UID all saving correctly, but for the life of me I cannot get the players location to save and read. I keep getting the error "error type String, expected number" on the init.sqf line 13 the "player setPosATL [_location select 0, _location select 1, _location select 2];" section. - Any help would be most appreciated. Init.sqf: _clientID = clientOwner; _UID = getPlayerUID player; _name = name player; _location = getPosATL player; checkForDatabase = [_clientID, _UID, _name, _location]; publicVariableServer "checkForDatabase"; "loadData" addPublicVariableEventHandler { _gear = (_this select 1); _location = [_this select 0, _this select 1, _this select 2]; player setUnitLoadout _gear; player setPosATL [_location select 0, _location select 1, _location select 2]; }; }; initServer: "checkForDatabase" addPublicVariableEventHandler { private ["_data"]; _data = (_this select 1); _clientID = (_data select 0); _UID = (_data select 1); _playerName = (_data select 2); _location = [_data select 0, _data select 1, _data select 2]; _inidbi = ["new", _UID, _location] call OO_INIDBI; _fileExist = "exists" call _inidbi; if (_fileExist) then { hint "FILE DOES EXIST, GETTING DATA"; null = [_UID, _clientID, _location] execVM "getData.sqf"; } else { hint "FILE DOES NOT EXIST, CREATING DATABASE"; null = [_clientID, _UID, _playerName, _location] execVM "createDatabase.sqf"; }; }; "saveData" addPublicVariableEventHandler { private ["_data"]; _data = (_this select 1); _UID = (_data select 0); _gear = (_data select 1); _location = [_data select 0, _data select 1, _data select 2]; _inidbi = ["new", _UID] call OO_INIDBI; ["write", ["Player Location", "Location", _location]] call _inidbi; ["write", ["Player Gear", "Gear", _gear]] call _inidbi; hint "data saved"; }; getData.sqf _UID = (_this select 0); _clientID = (_this select 1); _inidbi = ["new", _UID] call OO_INIDBI; _gear = ["read", ["Player Gear", "Gear", []]] call _inidbi; _location = ["read", ["Player Location", "Location", []]] call _inidbi; loadData = _gear; _clientID publicVariableClient "loadData"; saveData.sqf { _gear = getUnitLoadout player; _location = getPosATL player; saveData = [_UID, _gear, _location]; publicVariableServer "saveData"; }- 28 replies
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
The code above seems to just throw errors. The database is now coming in as: [_uid] Name=""Nomad"" Gear="[["arifle_MX_ACO_pointer_F","","acc_pointer_IR","optic_Aco",["30Rnd_65x39_caseless_mag",30],[],""],[],["hgun_P07_F","","","",["16Rnd_9x21_Mag",17],[],""],["U_B_CombatUniform_mcam_tshirt",[["ACE_fieldDressing",1],["ACE_packingBandage",1],["ACE_morphine",1],["ACE_tourniquet",1],["30Rnd_65x39_caseless_mag",2,30]]],["V_Chestrig_rgr",[["30Rnd_65x39_caseless_mag",5,30],["16Rnd_9x21_Mag",2,17],["HandGrenade",2,1],["B_IR_Grenade",2,1],["SmokeShell",1,1],["SmokeShellGreen",1,1],["Chemlight_green",2,1]]],["B_Carryall_mcamo_AAT",[["Titan_AT",2,1],["Titan_AP",2,1]]],"H_HelmetB_light","",["Rangefinder","","","",[],[],""],["ItemMap","","ItemRadio","ItemCompass","ItemWatch","NVGoggles"]]" [Player Info] Position="[1198.34,3403.18,0.00143909]" and it just repeats the error messages from the systemChat You said it was working on your end, would you be able to provide the full scripts so I can test it?- 28 replies
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for the update, I'll test that out tomorrow. My brain is entirely fried today to look at code- 28 replies
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Trying this alternative method... getting a new error code. _clientID = clientOwner; _UID = getPlayerUID player; _name = name player; _gear = getUnitLoadout player; _location = getPosATL player; checkForDatabase = [_clientID, _UID, _name, _gear, _location]; publicVariableServer "checkForDatabase"; "loadData" addPublicVariableEventHandler { _loadDataValue = _this select 1; //take the whole value and store it in a variable, value is [_gear, _location] _gear = _loadDataValue select 0; //select the first element of the array to get gear, alternatively could use ((_this select 1) select 0) _coordinates = ["read", ["Player Location", "Location", []]]] call _inidbi; //select second element, alternatively could use ((_this select 1) select 1) player setUnitLoadout _gear; player setPosATL _coordinates; }; My thought here is to define the variable _coordinates as reading the database file, then call that as the setPosATL but now I'm getting the following error code: "["Player Location", "Location", []]]] call_inidbi; player setUnitLoadout _... Error Missing ; Init.sqf - Line 12 Fixed, forgot to remove the extra ] Unfortunately it's not posting any errors, but it's also not doing anything either... which leaves me at a loss.- 28 replies
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Just fiddling around with the code a bit, changed the init.sqf to: "loadData" addPublicVariableEventHandler { _loadDataValue = _this select 1; //take the whole value and store it in a variable, value is [_gear, _location] _gear = _loadDataValue select 0; //select the first element of the array to get gear, alternatively could use ((_this select 1) select 0) _location = _loadDataValue select 1; //select second element, alternatively could use ((_this select 1) select 1) player setUnitLoadout _gear; player setPosATL ["read", ["Player Location", "Location", [1195.34,3407.94,30.00143909]]] call _inidbi; }; No major change, but I did manage to get the error code to change from 2 elements to 3 elements provided... Clearly the code is expecting something I'm just not sure what. player setPosATL ["read", [Player Location", "..." Error 2 elements provided, 3 expected- 28 replies
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
To be honest I'm not sure how to make a github, but this is the test mission I'm testing the framework off of if you want to fiddle with it and see if you can get it to work: https://mab.to/Y1W8HAPis (myairbridge link to a .rar file) If I can get this working I'll gladly share the main mission I'm developing it for with you, it's a multi-session operation type mission with some dynamic missions, headless client support, dynamic enemy occupation etc. The addon for the database is here: You just put the @inidbi2 folder in the Arma 3 directory and copy the key in there to the keys folder should start working- 28 replies
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I added this to the getData.sqf _location = ["read", ["Player Location", "Location", [1195.34,3407.94,30.00143909]]] call _inidbi; but I'm still getting the following error "player setUnitLoadout _gear; player setPosATL _location; }; File: Init.sqf Line 14 Error 1 elements provided, 3 expected This is so frustrating, I sincerely appreciate you taking the time to stick with me on this, I'm sure you have better things to do. Updated SQF's for reference: init.sqf _clientID = clientOwner; _UID = getPlayerUID player; _name = name player; _gear = getUnitLoadout player; _location = getPosATL player; checkForDatabase = [_clientID, _UID, _name, _gear, _location]; publicVariableServer "checkForDatabase"; "loadData" addPublicVariableEventHandler { _loadDataValue = _this select 1; //take the whole value and store it in a variable, value is [_gear, _location] _gear = _loadDataValue select 0; //select the first element of the array to get gear, alternatively could use ((_this select 1) select 0) _location = _loadDataValue select 1; //select second element, alternatively could use ((_this select 1) select 1) player setUnitLoadout _gear; player setPosATL _location; }; getData.sqf private _myArray = ["x","y","z"]; _UID = (_this select 0); _clientID = (_this select 1); _inidbi = ["new", _UID] call OO_INIDBI; _gear = ["read", ["Player Gear", "Gear", []]] call _inidbi; _location = ["read", ["Player Location", "Location", [1195.34,3407.94,30.00143909]]] call _inidbi; loadData = [_gear, _location]; _clientID publicVariableClient "loadData"; createDatabase.sqf private _myArray = ["x","y","z"]; _clientID = (_this select 0); _UID = (_this select 1); _playerName = (_this select 2); _gear = (_this select 3); _location = (_this select 4); _inidbi = ["new", _UID] call OO_INIDBI; ["write", ["Player Info", "Name", _playerName]] call _inidbi; ["write", ["Player Gear", "Gear", _gear]] call _inidbi; ["write", ["Player Location", "Location", _location,[_myArray]]] call _inidbi; initServer.sqf "checkForDatabase" addPublicVariableEventHandler { private ["_data"]; _data = (_this select 1); _clientID = (_data select 0); _UID = (_data select 1); _playerName = (_data select 2); _gear = (_data select 3); _location = [_data select 4]; _inidbi = ["new", _UID] call OO_INIDBI; _fileExist = "exists" call _inidbi; if (_fileExist) then { hint "FILE DOES EXIST, GETTING DATA"; null = [_UID, _clientID, _location] execVM "getData.sqf"; } else { hint "FILE DOES NOT EXIST, CREATING DATABASE"; null = [_clientID, _UID, _playerName, _gear, _location] execVM "createDatabase.sqf"; }; }; "saveData" addPublicVariableEventHandler { private ["_data"]; _data = (_this select 1); _UID = (_data select 0); _gear = (_data select 1); _location = [_data select 1]; _inidbi = ["new", _UID] call OO_INIDBI; ["write", ["Player Location", "Location", _location]] call _inidbi; ["write", ["Player Gear", "Gear", _gear]] call _inidbi; hint "data saved"; };- 28 replies
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I've defined a new array in the createDatabase.sqf file... which seems to take and populate the data onto the database, however I'm lost on how to call it correctly. createDatabase.sqf private _myArray = ["x","y","z"]; _clientID = (_this select 0); _UID = (_this select 1); _playerName = (_this select 2); _gear = (_this select 3); _location = (_this select 4); _inidbi = ["new", _UID] call OO_INIDBI; ["write", ["Player Info", "Name", _playerName]] call _inidbi; ["write", ["Player Gear", "Gear", _gear]] call _inidbi; ["write", ["Player Location", "Location", _location,[_myArray]]] call _inidbi; I tried changing the load data parameters to select each part of the array separately, not sure I'm doing it right init.sqf _clientID = clientOwner; _UID = getPlayerUID player; _name = name player; _gear = getUnitLoadout player; _location = getPosATL player; checkForDatabase = [_clientID, _UID, _name, _gear, _location]; publicVariableServer "checkForDatabase"; "loadData" addPublicVariableEventHandler { _loadData = _this select 1; //take the whole value and store it in a variable, value is [_gear, _location] _gear = _loadData select 0; //select the first element of the array to get gear, alternatively could use ((_this select 1) select 0) _location = _loadData select 1; //select second element, alternatively could use ((_this select 1) select 1) player setUnitLoadout _gear; player setPosATL (_location select 0, _location select 1, _location select 2); }; I keep receiving the error code "player setPosATL (_location select 0, _location select 1, _location select 2); Error Missing ) init.sqf - Line 14- 28 replies
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Since I'm using inidbi2, I found the parameters for the read sequence... Wondering if anyone can help me make sense of this. Function: read Usage : ["read", [_section, _key]] call _inidbi; Param: array string _section - name of sectrion containing the key string _key - name of key to read Output: value of key, if nothing is found return by default: false; You can set the default return value as follow (instead of false) ex: Usage : ["read", ["section", "key", "mydefaultvalueifnothingisfound"]] call _inidbi; Usage : ["read", ["section", "key", 0]] call _inidbi; Usage : ["read", ["section", "key", true]] call _inidbi; Usage : ["read", ["section", "key", ["mydefaultarray"]]] call _inidbi; Of particular interest is the ["mydefaultarray"]]] I think may help?- 28 replies
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Edit: Spoke too soon... It's loading the gear now, but not the location. Receiving the following error "player setUnitLoadout _gear; player setPosATL _location; }; Error 1 elements provided, 3 expected Source: Init.sqf line 14 If I am to interpret that correctly, it means it's expecting the x y z array? Not sure how to get it to define that- 28 replies
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hmm... It seems to be producing the error code: player setUnitLoadout _gear; player setPosATL _location; }; Error 0 elements provided, 3 expected Source: Init.sqf The side chat is still responding "any" -------------------------- Edit: Looks like that was due to me changing the line in createDatabase.sqf from: ["write", ["Player Location", "Location", _location]] call _inidbi;- 28 replies
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Using the following init.sqf player groupChat (format ["%1",_location]); _clientID = clientOwner; _UID = getPlayerUID player; _name = name player; _gear = getUnitLoadout player; _location = getPosATL player; checkForDatabase = [_clientID, _UID, _name, _gear, _location]; publicVariableServer "checkForDatabase"; "loadData" addPublicVariableEventHandler { _gear = (_this select 1); _location = [_this select 0, _this select 1, _this select 2]; player setUnitLoadout _gear; player setPosATL _location; }; it comes back with the reply "Any" Not quite sure what to make of that, the original systemChat str _location command was throwing up errors- 28 replies
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I haven't quite figured out how to define the _location]] call _indibi as an array so I haven't checked the error on that, but at the moment I'm receiving: _this select 1, _this select 2]; player setPosATL _...' Error type Array, expected Bool File: init.sqf... line 12- 28 replies
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
My assumption right now is that the issue lies with: "loadData" addPublicVariableEventHandler { _gear = (_this select 1); _location = [_this select 0, _this select 1, _this select 2]; player setUnitLoadout _gear; player setPosATL _location; }; attempting to call an array from the database, but I'm not saving it as an array in ["write", ["Player Info", "Name", _playerName]] call _inidbi; ["write", ["Player Gear", "Gear", _gear]] call _inidbi; ["write", ["Player Location", "Location", _location]] call _inidbi; Not sure if that's off base or where to go from here. Going to fiddle with the _location parameter...- 28 replies
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Eureka! I now have the database posting the unit position, gear, and name and saving it as a UID file. My only issue now is it is not reading or setting the position of the player from the database file. Posting the completed edits for anyone interested: init.sqf _clientID = clientOwner; _UID = getPlayerUID player; _name = name player; _gear = getUnitLoadout player; _location = getPosATL player; checkForDatabase = [_clientID, _UID, _name, _gear, _location]; publicVariableServer "checkForDatabase"; "loadData" addPublicVariableEventHandler { _input = _this select 1; player setUnitLoadout (_gear select 0); player setPosATL (_location select 1); }; initServer.sqf "checkForDatabase" addPublicVariableEventHandler { private ["_data"]; _data = (_this select 1); _clientID = (_data select 0); _UID = (_data select 1); _playerName = (_data select 2); _gear = (_data select 3); _location = [_data select 4]; _inidbi = ["new", _UID] call OO_INIDBI; _fileExist = "exists" call _inidbi; if (_fileExist) then { hint "FILE DOES EXIST, GETTING DATA"; null = [_UID, _clientID, _location] execVM "getData.sqf"; } else { hint "FILE DOES NOT EXIST, CREATING DATABASE"; null = [_clientID, _UID, _playerName, _gear, _location] execVM "createDatabase.sqf"; }; }; "saveData" addPublicVariableEventHandler { private ["_data"]; _data = (_this select 1); _UID = (_data select 0); _gear = (_data select 1); _location = [_data select 1]; _inidbi = ["new", _UID] call OO_INIDBI; ["write", ["Player Location", "Location", _location]] call _inidbi; ["write", ["Player Gear", "Gear", _gear]] call _inidbi; hint "data saved"; }; createDatabase.sqf _clientID = (_this select 0); _UID = (_this select 1); _playerName = (_this select 2); _gear = (_this select 3); _location = (_this select 4); _inidbi = ["new", _UID] call OO_INIDBI; ["write", ["Player Info", "Name", _playerName]] call _inidbi; ["write", ["Player Gear", "Gear", _gear]] call _inidbi; ["write", ["Player Location", "Location", _location]] call _inidbi; getData.sqf _UID = (_this select 0); _clientID = (_this select 1); _inidbi = ["new", _UID] call OO_INIDBI; _gear = ["read", ["Player Gear", "Gear", []]] call _inidbi; _location = ["read", ["Player Location", "Location", []]] call _inidbi; loadData = [_gear, _location]; _clientID publicVariableClient "loadData"; saveData.sqf { _gear = getUnitLoadout player; _location = getPosATL player; saveData = [_UID, _gear, _location]; publicVariableServer "saveData"; }- 28 replies
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I'm SO close! The database is now reporting the location but not the gear. Here is what I have so far. I know I'm missing an integer somewhere or the _gear classname somewhere I just can't quite figure it out yet. saveData.sqf: { _gear = getUnitLoadout player; _location = getPosATL player; saveData = [_UID, _gear, _location]; publicVariableServer "saveData"; } getData.sqf: _UID = (_this select 0); _clientID = (_this select 1); _inidbi = ["new", _UID] call OO_INIDBI; _gear = ["read", ["Player Gear", "Gear", []]] call _inidbi; _location = ["read", ["Player Location", "Location", []]] call _inidbi; loadData = [_gear, _location]; _clientID publicVariableClient "loadData"; createDatabase.sqf _clientID = (_this select 0); _UID = (_this select 1); _playerName = (_this select 2); _gear = (_this select 1); _location = (_this select 3); _inidbi = ["new", _UID] call OO_INIDBI; ["write", ["Player Info", "Name", _playerName]] call _inidbi; ["write", ["Player Gear", "Gear", _gear]] call _inidbi; ["write", ["Player Location", "Location", _location]] call _inidbi; initServer.sqf: "checkForDatabase" addPublicVariableEventHandler { private ["_data"]; _data = (_this select 1); _clientID = (_data select 0); _UID = (_data select 1); _playerName = (_data select 2); _location = [_data select 3]; _inidbi = ["new", _UID] call OO_INIDBI; _fileExist = "exists" call _inidbi; if (_fileExist) then { hint "FILE DOES EXIST, GETTING DATA"; null = [_UID, _clientID, _location] execVM "getData.sqf"; } else { hint "FILE DOES NOT EXIST, CREATING DATABASE"; null = [_clientID, _UID, _playerName, _location] execVM "createDatabase.sqf"; }; }; "saveData" addPublicVariableEventHandler { private ["_data"]; _data = (_this select 1); _UID = (_data select 0); _gear = (_data select 1); _location = [_data select 1]; _inidbi = ["new", _UID] call OO_INIDBI; ["write", ["Player Location", "Location", _location]] call _inidbi; ["write", ["Player Gear", "Gear", _gear]] call _inidbi; hint "data saved"; }; init.sqf: _clientID = clientOwner; _UID = getPlayerUID player; _name = name player; _location = getPosATL player; checkForDatabase = [_clientID, _UID, _name, _location]; publicVariableServer "checkForDatabase"; "loadData" addPublicVariableEventHandler { _input = _this select 1; player setUnitLoadout (_gear select 0); player setPosATL (_location select 1); };- 28 replies
-
inidbi2 Help - Saving Player Location (Help with an Array)
pliskin124 replied to pliskin124's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Managed to clear the previous error "["player Location", "Location", []]]|#|] call_indibi; Error Missing ; File: createDatabase.sqf By changing the line ["write", ["Player Location", "Location", []]] call _inidbi; to: ["write", ["Player Location", "Location", 0]] call _inidbi; No errors received, it is successfully writing to the db, the only issue now is none of the data seems to be compiling. Database: [Player Info] Name=""Nomad"" [Player Gear] Gear="[]" [Player Location] Location="0" I am certain this is some small error I'm making but I'm not sure where to go from here.- 28 replies