GeordieBen
Member-
Content Count
24 -
Joined
-
Last visited
-
Medals
Everything posted by GeordieBen
-
Arma2MySQL
GeordieBen replied to firefly2442's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I didnt actually use a .sql file i just made the database with phpmyadmin and created the full database with the sql query window. I spent 3/4 month learning sql before attempting this persistent database, seems like its all been a waste of time lmfao. I dont have to have a database document stored in the /Appdata/Arma2NETMySQL do i? I noticed you have in the example mission a mysql and a sqlite folders, sqlite i can understand because thats simply saves the data there and im assuming the mysql is just purely there for someone to import to there database. Anyway, heres a log showing that running a command in the explorer works... Info: 17:35:53 - Logging started in directory: C:\Users\GeordieBen\AppData\Local\Arma2NETMySQL/logs/ Info: 17:35:53 - Arma2NETMySQL Plugin Started. Info: 17:35:53 - Version number: 0.1.0.0 Info: 17:35:53 - Loading databases... Warning: 17:35:53 - Unable to find the Databases.txt file here: C:\xxgames\BENM1\1445\@Arma2NET\Databases.txt Info: 17:35:53 - Databases.txt file loading in from: C:\Users\GeordieBen\AppData\Local\Arma2NETMySQL/Databases.txt Info: 17:35:53 - Type: mysql Database: wasteland IPAddress: 127.0.0.1 Port: 3306 Username: wasteland Password: NotShownForSecurityReasons Error: 17:35:54 - The number and/or format of the arguments passed in doesn't match. Info: 17:40:24 - Received - Database: wasteland SQL Query: SELECT * FROM users LIMIT 3 Info: 17:51:54 - Received - Database: wasteland SQL Query: SELECT * FROM users LIMIT 3 There must be some error in my sqf coding, im not great at sqf code if im honest.... Just picking up bits and bobs as i go. I'm wondering if this code is correct? _puid = _this select 0; _pname = _this select 1; _getDir = _this select 2; _getPos = _this select 3; _query = format ["INSERT INTO users (uid, name, dir, pos,) VALUES ('%0', '%1', '%2', '%3')", _puid,_pname,_getDir,_getPos]; TRACE_1("Query: ",_query); "Arma2Net.Unmanaged" callExtension format ["Arma2NETMySQLCommand ['wasteland', '%0']", _query]; Should it be like this _puid = _this select 0; _pname = _this select 1; _getDir = _this select 2; _getPos = _this select 3; _query = format ["INSERT INTO users (uid, name, dir, pos,) VALUES ('_puid', '_pname', '_getDir', '_getPos')"]; TRACE_1("Query: ",_query); "Arma2Net.Unmanaged" callExtension format ["Arma2NETMySQLCommand ['wasteland', '%0']", _query]; -
Arma2MySQL
GeordieBen replied to firefly2442's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
I followed your video tut, the Arma2mysql is in the appdata with the logs folder, and database.txt, everything else is in the servers root directory in the @arma2net. How would I test if the plugin loads when Arma starts mate? What do I type into a2net explorer? Bet my problem is something simple lol, I have done everything over 2/3 times over and still no further forward haha Regards Geordie -
Arma2MySQL
GeordieBen replied to firefly2442's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Yes i have the following command line... -mod=expansion\beta;expansion\beta\expansion;@CBA_CO;@CBA_OA;@CBA_A2;@CBA;@Arma2NET -arma2netdev in my Arma2NETMySQL file there is logs, but only ones logged via the Arma2NET explorer, as for C:\Users\Yourname\AppData\Local\Arma2NET\ i dont have this file at all -
Arma2MySQL
GeordieBen replied to firefly2442's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hey Buddy, Yea i though everything looked ok to, i just dont understand why nothing is showing in my database. I'm getting no logs at all, sorry infact the only logs i get are when i run the Arma2Netexplorer.exe i can insert data into the database via the explorer with commands such as Arma2NETMySQLCommand ["wasteland", "INSERT INTO users (uid, name, ammo, money, food, water, health, weapons, location) VALUES ( '8998', 'jogn', '21', '2', '2', '2', '2', '2', '2' )"] But starting the server and trying to get something to save just doesnt happen. I run this on a windows 2008 r2 dedicated server, where would my logs save?? I have logs saving in AppData but only ones i mentioned before that are logged while executing commands in the explorer. Im not getting any server_console.log or RPT logs saving anywhere. Regards, Geordie -
Arma2MySQL
GeordieBen replied to firefly2442's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hey Guys, Ok so im a little stuck here guys. I have added the CBA_CO into the root directory and i get the following message ingame " YOU ARE MISSING THE FOLLOWING MOD CBA_MAIN" isnt CBA server side? Anyway to the point, i want to use CBA to help trace my query's for the MySql plugin because my data isnt being stored into my MySQL database. Because im not the best scripter, infact im not a scripter at all if im honest (but learning) i am using (ZAG)Ed! "Copy To Clipboard" persistent database script and trying to mod it in a way that instead of saving to txt documents it stores into my local database. So heres what i have got In my init.sqf //init 3rd Party Scripts [] execVM "addons\cleanup.sqf"; [] execVM "addons\R3F_ARTY_AND_LOG\init.sqf"; [] execVM "addons\proving_Ground\init.sqf"; [] execVM "dbcore\init.sqf"; <<<< my database init [0.1, 0.5, 0.5] execVM "addons\scripts\DynamicWeatherEffects.sqf"; in my dbcore\init.sqf //Loading scripts if(isServer) then { execVM "persistentdb\loadplayers.sqf"; execVM "persistentdb\loadobjects.sqf"; execVM "persistentdb\saveobjects.sqf"; execVM "persistentdb\saveplayerserver.sqf"; }; if(!isDedicated) then { execVM "dbcore\saveplayers.sqf"; //execVM "dbcore\loadrequest.sqf"; }; and finally in my dbcore\saveplayers.sqf //Player save //Author: {ZAG}Ed! persistentstatsloaded = false; waitUntil {persistentstatsloaded}; persistentdbsaveplayertimerrunning = false; while {true} do { waitUntil{alive player}; waitUntil{!respawnDialogActive}; persistentdbsaveplayertimer = false; _team = side player; _puid = getPlayerUID player; [] spawn {if(persistentdbsaveplayertimerrunning) exitWith {}; persistentdbsaveplayertimerrunning = true; sleep 15; persistentdbsaveplayertimer = true; persistentdbsaveplayertimerrunning = false;}; //minor exploit prevention _weapons = count(weapons player); waitUntil {persistentdbsaveplayertimer or !alive player or (count(weapons player) != _weapons) or mutexScriptInProgress}; if(mutexScriptInProgress) then {sleep 0.5}; if (isServer) then { private ["puid", "pname", "getDir", "getPos", "weapons", "magazine", "health", "thirstlevel", "hungerlevel", "cmoney", "canfood", "water", "medkits", "fuel", "repairkits", "fuelFull", "fuelEmpty", "bombs", "spawnBeacon", "camonet"]; _puid = _this select 0; _pname = _this select 1; _getDir = _this select 2; _getPos = _this select 3; _query = format ["INSERT INTO table_users (uid, name, dir, pos,) VALUES ('%0', '%1', '%2', '%3')", _puid,_pname,_getDir,_getPos]; TRACE_1("Query: ",_query); "Arma2Net.Unmanaged" callExtension format ["Arma2NETMySQLCommand ['wasteland', '%0']", _query]; call CBA_fnc_addEventHandler; _weapons = _this select 4; _magazine= _this select 5; _health = _this select 6; _thirthlevel = _this select 7; _query = format ["INSERT INTO table_users (weapons, magazine, health, thirstlevel) VALUES ('%4', '%5', '%6', '%7')", _weapons,_magazine,_health,_thirstlevel]; "Arma2Net.Unmanaged" callExtension format ["Arma2NETMySQLCommand ['wasteland', '%1']", _query]; _hungerlevel = _this select 8; _cmoney = _this select 9; _canfood = _this select 10; _water = _this select 11; _query = format ["INSERT INTO table_users (hungerlevel, cmoney, canfood, water) VALUES ('%8', '%9', '%10', '%11')", _hungerlevel,_cmoney,_canfood,_water]; "Arma2Net.Unmanaged" callExtension format ["Arma2NETMySQLCommand ['wasteland', '%1']", _query]; _medkits = _this select 12 _fuel = _this select 13; _repairkits = _this select 14; _fuelFull = _this select 15; _query = format ["INSERT INTO table_users (medkits, fuel, repairkits, fuelFull) VALUES ('%12', '%13', '%14', '%15')", _medkits,_fuel,_repairkits,_fuelFull ]; "Arma2Net.Unmanaged" callExtension format ["Arma2NETMySQLCommand ['wasteland', '%1']", _query]; _fuelEmpty = _this select 16; _bombs = _this select 17; _spawnBeacon = _this select 18; _camonet = _this select 19; _query = format ["INSERT INTO table_users (fuelEmpty, bombs, spawnBeacon, camonet) VALUES ('%16', '%17', '%18', '%19')", _fuelEmpty,_bombs,_spawnBeacon,_camonet]; "Arma2Net.Unmanaged" callExtension format ["Arma2NETMySQLCommand ['wasteland', '%1']", _query]; }; /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////// ORIGINAL CODE BELOW /////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //_itemarray = [player getVariable "cmoney", //player getVariable "canfood", //player getVariable "medkits", //player getVariable "water", //player getVariable "fuel", //player getVariable "repairkits", //player getVariable "fuelFull", //player getVariable "fuelEmpty", //player getVariable "bombs", //player getVariable "spawnBeacon", //player getVariable "camonet", //hungerLevel, //thirstLevel] /; //_locationarray = [getPos player, getDir player]; //_weaponsarray = [weapons player, magazines player]; //_damage = getDammage player; //if(!alive player) then { //_itemarray = [0,0,0,0,0,0,0,0,0,0,0,0,0]; //_weaponsarray = [[],[]]; //_damage = 1 //}; //playersavearray = [_itemarray, _locationarray, _weaponsarray, _damage]; //call compile (format["%2%1playersave = playersavearray; //publicVariableServer ""%2%1playersave"";", getPlayerUID player, _team]); //}; Is there anything that looks like it shouldnt be there? also do i have to make a script to tell arma to communicate with the database or is this done automatically with the plugin? Really hope someone can point me in the right direction, this is bugging the hell out of me Thanks Regards, Geordie -
Arma2MySQL
GeordieBen replied to firefly2442's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi Kaski, A way to test this without starting your server, open \Arma 2 Operation Arrowhead\@Arma2NET and run Arma2Net Explorer.exe. Click list Addins make sure your pluggins show then click Load Addins. If all Addins load etc in the bottom command box copy and paste this Arma2NETMySQLCommand ['weapons', 'SELECT * FROM users LIMIT 3'] Then check back to your C:\Users\Administrator\AppData\Local\Arma2NETMySQl\logs directory..... There you should find a log buddy, and info inside to let you know if it has access to your database and if there was any problems. Hope this helps Regards, Geordie Edit: Please note that in this command "Arma2NETMySQLCommand ['weapons', 'SELECT * FROM users LIMIT 3']" Change "weapons" to your database name. Incase you are trying to connect to a remote MYSQL server make sure you allow access from your Windows server, My advice install everything locally -
Arma2MySQL
GeordieBen replied to firefly2442's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hey firefly2442, Yes your code for the Explorer was correct mate thanks, however i dont really understand the sqf code. I'm not pro at this and im only picking bits and bobs up. What i am trying to do is have players stuff save from my wasteland server for example private ["uid", "name", "ammo", "money", "food", "water", "health", "weapons", "location"]; _uid = _this select 0; _name = _this select 1; _ammo = _this select 2; _money = _this select 3; _food = _this select 4; _water = _this select 5; _health = _this select 6; _weapons = _this select 7; _location = _this select 8; _query = format ["INSERT INTO table_users (uid, name, ammo, money, food, water, health, weapons, location) VALUES ('%1', '%2', '%3', '%4', '%5', '%6', '%7', '%8', '%9')", _uid, _name, _ammo, _money, _food, _water, _health, _weapons, _location]; "Arma2Net.Unmanaged" callExtension format ["Arma2NETMySQLCommand ['wasteland', '%1']", _query]; Is this anywhere near close? I mean all i need is for players stuff to save upon spawn, reconnect and disconnect lol -
Arma2MySQL
GeordieBen replied to firefly2442's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hi Guys, Ok so i finally got the whole Arma2Net thing receiving data from my database via the Arma2Net Explorer, How do i execute it to INSERT INTO the users table? Here is what i tried... Arma2NETMySQLCommand ['wasteland', 'INSERT INTO table_users (id ,uid, name) VALUES ('5', '8998', 'jogn');'] Am i missing something guys, or is the whole sizzel wrong? Regards, Geordie -
Error Undefined variable in expression: _tank
GeordieBen posted a topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Hey guys, I am receiving the following error in my RPT log..... And heres the AbaBase.sqf lines of code surrounding this error Hope Someone can help me, coz this is driving me nuts. The mission appears on the map, but there is nothing created. Luckily the other main,side missions do actually still work for the moment. Regards, Geordie -
Introducing Server-side Event Logging/Blocking
GeordieBen replied to $able's topic in ARMA 2 & OA - Servers & Administration
Hey mate, i am running Beta-103718 dunno if thats the latest one XD -
Error Undefined variable in expression: _tank
GeordieBen replied to GeordieBen's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
what do you think the best solution is KillZone? I'm just learning how to script :) -
Error Undefined variable in expression: _tank
GeordieBen replied to GeordieBen's topic in ARMA 2 & OA : MISSIONS - Editing & Scripting
Thanks KillZone, i will give this a try and see what happens..... Mikie Boy, here is the whole Ababase.sqf script //Side Mission Colour = #4BC9B0 - Turquoise //Main Mission Colour = #52bf90 - Light blue //Fail Mission Colour = #FF1717 - Light red //Fail Mission Colour = #17FF41 - Light green //Sub Colour = #FFF - White if(!isServer) exitwith {}; diag_log format["WASTELAND SERVER - Mission Started"]; private ["_base","_unitsAlive","_playerPresent","_missionType","_successTextColour","_mainTextColour","_failTextColour","_subTextColour","_picture","_vehicleName","_rad","_centerPos","_missionTimeOut","_missionDelayTime","_missionTriggerRadius","_missionPlayerRadius","_flatAreas","_randomArea","_hint","_startTime","_currTime","_result","_tank", "_randomPos"]; //Mission Initialization. _rad=20000; _result = 0; _missionType = "Capture Military Base"; _mainTextColour = "#52bf90"; _successTextColour = "#17FF41"; _failTextColour = "#FF1717"; _subTextColour = "#FFFFFF"; _missionTimeOut = 1800; _missionDelayTime = 1200; _missionPlayerRadius = 50; _GotLoc = false; while {!_GotLoc} do { _randomIndex = random (count MissionSpawnMarkers - 1); //If the index of the mission markers array is false then break the loop and finish up doing the mission if (!((MissionSpawnMarkers select _randomIndex) select 1)) then { _selectedMarker = MissionSpawnMarkers select _randomIndex select 0; _randomPos = getMarkerPos _selectedMarker; MissionSpawnMarkers select _randomIndex set[1, true]; _GotLoc = true; }; }; //ensure the rest of the script doesn't continue until we are done waitUntil {_GotLoc}; //Tell everyone their will be a mission soon. _hint = parseText format ["<t align='center' color='%2' shadow='2' size='1.75'>Main Objective</t><br/><t align='center' color='%2'>------------------------------</t><br/><t color='%3' size='1.0'>Starting in %1 Minutes</t>", _missionDelayTime / 60, _mainTextColour, _subTextColour]; [nil,nil,rHINT,_hint] call RE; //Wait till the mission is ready to be ran. diag_log format["WASTELAND SERVER - Mission Waiting to run"]; _startTime = floor(time); waitUntil { sleep 1; _currTime = floor(time); if(_currTime - _startTime >= _missionDelayTime) then {_result = 1;}; (_result == 1) }; diag_log format["WASTELAND SERVER - Mission Resumed"]; _result = 0; //Add marker to client marker array. clientMissionMarkers set [count clientMissionMarkers,["Base_Marker",_randomPos,"Capture Military Base"]]; publicVariable "clientMissionMarkers"; _veh = ["outpostUS1"] call BIS_fnc_selectRandom; _base = [_veh, 0, _randomPos] execVM "server\functions\createBase.sqf"; _vehicleName = "Outpost"; _hint = parseText format ["<t align='center' color='%3' shadow='2' size='1.75'>Main Objective</t><br/><t align='center' color='%3'>------------------------------</t><br/><t align='center' color='%4' size='1.25'>%1</t><br/><t align='center' color='%4'>A<t color='%3'> %2</t>, has been spotted near the marker go capture it.</t>", _missionType, _vehicleName, _mainTextColour, _subTextColour]; [nil,nil,rHINT,_hint] call RE; _group = createGroup civilian; [_group,_randomPos]execVM "server\missions\createUnits\largeGroup.sqf"; [_group, _randomPos] call BIS_fnc_taskDefend; diag_log format["WASTELAND SERVER - Mission Waiting to be Finished"]; _startTime = floor(time); waitUntil { sleep 1; _playerPresent = false; _currTime = floor(time); if(_currTime - _startTime >= _missionTimeOut) then {_result = 1;}; {if((isPlayer _x) AND (_x distance _tank <= _missionPlayerRadius)) then {_playerPresent = true};}forEach playableUnits; _unitsAlive = ({alive _x} count units CivGrpM); (_result == 1) OR ((_playerPresent) AND (_unitsAlive < 1)) OR ((damage _tank) == 1) }; if(_result == 1) then { //Mission Failed. _hint = parseText format ["<t align='center' color='%3' shadow='2' size='1.75'>Objective Failed</t><br/><t align='center' color='%3'>------------------------------</t><br/><t align='center' color='%4' size='1.25'>%1</t><br/><t align='center' color='%4'>Objective failed, better luck next time</t>", _missionType, _vehicleName, _failTextColour, _subTextColour]; [nil,nil,rHINT,_hint] call RE; diag_log format["WASTELAND SERVER - Mission Failed"]; } else { //Mission Complete. _hint = parseText format ["<t align='center' color='%3' shadow='2' size='1.75'>Objective Complete</t><br/><t align='center' color='%3'>------------------------------</t><br/><t align='center' color='%4' size='1.25'>%1</t><br/><t align='center' color='%4'>The base has been captured, use what you found to help you crush the enemy</t>", _missionType, _vehicleName, _successTextColour, _subTextColour]; [nil,nil,rHINT,_hint] call RE; diag_log format["WASTELAND SERVER - Mission Finished"]; }; //Reset Mission Spot. MissionSpawnMarkers select _randomIndex set[1, false]; //Remove marker from client marker array. { if(_x select 0 == "Base_Marker") then { clientMissionMarkers set [_forEachIndex, "REMOVETHISCRAP"]; clientMissionMarkers = clientMissionMarkers - ["REMOVETHISCRAP"]; publicVariable "clientMissionMarkers"; }; }forEach clientMissionMarkers; mainMissionRunning = false; As you can see i have _tank defined in the following Is it here i have done this wrong? Thanks for your replies :) Regards, Geordie -
MP fast rope script addon
GeordieBen replied to norrin's topic in ARMA 2 & OA - ADDONS & MODS: COMPLETE
I know this topic is really old, but can this script be added to a missions pbo file or does this actually have to be added to a mod. I did try and add this sometime ago when i found this on armaholic but there wasnt alot of info there to help me.... Could someone be so kind as to point in the right direction please.... Regards, Geordie -
Server Bans For No Reason???? Please Help
GeordieBen posted a topic in ARMA 2 & OA - Servers & Administration
Hi Guys, I have another query about server bans.... We are getting alot of regular members what have been banned for no reason, i was in the server playing alongside this fello and it come up that he got a ban. It wasnt a Battleye ban or anything, just a total random. Anyways i searched my logs and found this 19:36:39 Player Spastic bob: Signature check timed out 19:36:40 Player Spastic bob disconnected. Thats the exact time he was banned. I also found this in my RPT file 19:36:39 NetServer::SendMsg: cannot find channel #2007020923, users.card=17 19:36:39 NetServer: users.get failed when sending to 2007020923 19:36:39 Message not sent - error 0, message ID = ffffffff, to 2007020923 (Spastic bob) 19:36:40 Client: Remote object 2:815 not found I dont know if my server.cfg file has anything to do with it with having this.... onHackedData = "ban (_this select 0)"; // tampering of the signature detected Here is a link to a screenshot from this person..... I have a few guys posting the same images. http://tinypic.com/r/9h3ucl/6 Oh and none of these guys can be found via ip or guid in my bans list, so does anyone know where these bans could be held/stored? Once again thanks in advance. Regards, Geordie -
Server Bans For No Reason???? Please Help
GeordieBen replied to GeordieBen's topic in ARMA 2 & OA - Servers & Administration
Just incase anyone else comes across this and bans cannot be found in your battleye bans.txt.... try the server root, i had a bans.txt created there that held there player ID Regards, Geordie -
Introducing Server-side Event Logging/Blocking
GeordieBen replied to $able's topic in ARMA 2 & OA - Servers & Administration
Yea i'm confused aswell buddy hahaha, oh well nvm :) -
Introducing Server-side Event Logging/Blocking
GeordieBen replied to $able's topic in ARMA 2 & OA - Servers & Administration
Sure buddy, heres a Screenshot -
Server Bans For No Reason???? Please Help
GeordieBen replied to GeordieBen's topic in ARMA 2 & OA - Servers & Administration
Thanks nuxil, I have changed this now. As for the bans on my server members can these be lifted in any way? These bans cannot be found and any of the bans.txt -
Can you please Assist on this log?
GeordieBen posted a topic in ARMA 2 & OA - Servers & Administration
Hey All, I am new to the community, i was wondering if you could kindly help me with something i have noticed in my "SCRIPTS.LOG" file? I have banned a user from our server because i was alerted of a hacker round about 7pm GMT... so i hunted in the logs to see if i could see anything and i saw this As you can see the person i have banned is "iiBetrayforAR"...... i was told the hacker teleported everyone to him and killed them. the script above looks to me as if iiBetrayforAR has done something to every player in my server (all 60 this is a small snipper) hence why i have banned him. I would like someone, if possible to assist me on my decision to ban this person please.. And please excuse my use of hiding players IP and GUID except the suspected hacker. Really hope you can help, and a huge thanks to those who do. Regards, Geordie -
Can you please Assist on this log?
GeordieBen replied to GeordieBen's topic in ARMA 2 & OA - Servers & Administration
Thanks for that Marker, much appreciated buddy -
Introducing Server-side Event Logging/Blocking
GeordieBen replied to $able's topic in ARMA 2 & OA - Servers & Administration
Sorry yea thats what i have "createVehicle.txt" and it still doesnt log -
Introducing Server-side Event Logging/Blocking
GeordieBen replied to $able's topic in ARMA 2 & OA - Servers & Administration
Thanks for the reply "redshirt_ensign" Correct i am using the Wasteland/BE directory because that seems to be the only place Battleye is, i dont have a folder in my OA server files at all..... Scripts.log seems to work ok there but the vehicle.txt wont, also i have RCON access working at the moment. Is there anything else i could try? -
Arma 3 Restarter.exe server monitor
GeordieBen replied to thevisad's topic in ARMA 3 - SERVERS & ADMINISTRATION
Hi Guys How do i stop steam from loading whe i start my server? i have read many post but still getting nowhere with this XD Thanks Ben -
Introducing Server-side Event Logging/Blocking
GeordieBen replied to $able's topic in ARMA 2 & OA - Servers & Administration
Hi all, could someone help me get my createvehicle.txt to start logging please? I run a wasteland server with a pre-built createvehicles.txt in my BE directory but it doesnt seem to create a log file for spawned vehicles heres whats in my txt file Should this be logging or do i have to setup something else to help with the logging. Regards, Geordie