Jump to content

RimBlock

Member
  • Posts

    1140
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by RimBlock

  1. The resulting .sql file will rebuild all the DB tables, triggers and events for the databases (schemas) you have chosen to backup.

     

    If you open the file in your SQL editor and change the name of the DB at the top (use [DBNAME] line) then you could remake a copy fo your live DB in a new DB for comparing data and checking things without the need to overwrite the live data.

     

    I suspect (but would need to check) that the resulting .sql backup file does not drop tables etc if they already exist.  Have a quick check to see if there are any "if exists then drop table [tablename]" type lines.  I know I was thinking of deliberately leaving this option out as it is very easy to accidently load a sql dump over the top of your prod database by mistake (i.e. someone forgot to change the 'use [dbname] line' as I have before - luckily only on a test system).

     

    To add in the drop database command you can add the "--add-drop-database" parameter to the mysqldump line (after "--quick " should work) in the .bat file.  This will drop the whole DB and recreate it when you run the resulting SQL in the backup SQL file (the actual backup will only dump out the contents of the DB so no risk there).

  2. Ok,

     

    An issue with copying it to the forums code box.

     

    change

    for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' SET ldt=%%jset
    datestamp=%ldt:~0,4%-%ldt:~4,2%-%ldt:~6,2%.%ldt:~8,2%-%ldt:~10,2%-%ldt:~12,2%
     

    to

    for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' SET ldt=%%j
    set datestamp=%ldt:~0,4%-%ldt:~4,2%-%ldt:~6,2%.%ldt:~8,2%-%ldt:~10,2%-%ldt:~12,2%
     

    Edit: have updated it in post 56 above as well.

  3. Thanks.

     

    Ok, the code below should sort you out regardless of datetime format.  I am not a batch file programmer by any means but after a quick google and play this seems to work.  Give it a test and let me know.

    @REM *** PARAMETERS/VARIABLES ***
    SET BackupDir="[Where you want to save the backups]"
    SET mysqldir="C:\Program Files\MySQL\MySQL Server 5.6\bin"
    SET mysqlschema=[Your DB schema name]
    SET mysqlpassword=[your DB password]
    SET mysqluser=[your DB user login]
    SET housekeepafter=5
    
    for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' SET ldt=%%j
    set datestamp=%ldt:~0,4%-%ldt:~4,2%-%ldt:~6,2%.%ldt:~8,2%-%ldt:~10,2%-%ldt:~12,2%
    
    @REM *** EXECUTION ***@REM Change to mysqldir
    c:
    cd %mysqldir%
    
    @REM dump/backup ALL database, this is all in one line
    mysqldump -u %mysqluser% -p%mysqlpassword% --databases %mysqlschema% --routines --events --triggers --quick >%BackupDir%\%mysqlschema%_backup.%datestamp%.sql
    
    @REM - Housekeeping
    forfiles -p %BackupDir% -s -m *.sql -d -%housekeepafter% -c "cmd /c del @path"

    The forum code block did a good attempt at messing up all the lines but I think I have got them all straightened out.

     

    If both of you have a chance to sest and it all goes well then I will push it to the Epoch core files.

     

    Thanks.

  4. Ok, so it is the difference between UK date format and US date format.

     

    We should be able to account for that in the bat file itself without needing to change the time format on the server although changing the regional settings to US time format will resolve the issue as a short term fix.

     

    Let me take a look at the code again. 

  5. Take a look at the file name of the file that it is trying to write too.

    There is a / in the date for some reason.

    First thought would be that the server date / time format is different to what is expected.

    Try running date /t at a command prompt and paste back the results here.

    Seems like the actual date portion is having issues rather than the time part.

  6. When are you guys going to improve the spam protection? I've volunteered to be a moderator and could help out but I'm guessing you guys don't think you need the help? A whole page full of spam.... Maybe it's time to turn on admin validation of all new accounts?

     

    The new posts list went from 8 pages to 38 pages :( .  Has been going on for a while now.  Makes navigating the forums a major pain untill they get cleaned up.

  7. That's a shame.  Having some risk of there being no stock can be quite good (or frustrating) when searching for items on a server.

     

    I would have probably looked at changing the EH to also pass a number of items to the server and then just get the server to loop one DB call at a time for each item.  Client to server is limited to a single call and the server can add a delay on the DB calls.  Would need to build something in to manage clearing any outstanding changes before a restart (kick the players for restart then wait until the queues are clear and then restart the server.

     

    Not the most efficient but with the hiveEXT limitations, still workable.

     

    Will be good to see how this mod progresses after the config traders version is out.

  8. Hi Zupa,

     

    Good to see this is progressing nicely.

     

    One thing I thought I would mention is a limitation with the Hiveext.dll. 

     

    Scanning through the SQL in the hivesql code I noticed that the calls for buying or selling are hard coded for individual item updates to the trader inventories (i.e. buy 1x tin of beans and the code will make a call to the DB 1 time to deduct 1 from the traders inventory in the DB, buy 10x tin of beans and the code needs to make the call to the hive 10 times :wacko: ).  This is not so much of an issue when there is the animation cycle between single item purchases but if someone buys 10 cans of beans using the gui it may start firing 10 updates at the DB in quick succession.  This in itself should not be too much of an issue for a reasonible MySQL server install but may cause some issues later around server restarts or with lots of players buying and selling at the same time. 

     

    Have a scan of the code here.  The function is fetchTraderObject at the bottom of the file which is part of the 398 call initiated from server_tradeObject.sqf

     

    It would probably be pretty easy to update the hive code to change this to a variable rather than a hard coded number allowing each call to update stock levels in more than a single item increment (yep another custom hive version) unless you have already worked around this some other way.

     

    I came across this when checking out the code for adding items to traders and how the hive gets the data.  Just thought you may like the heads up in case you were not aware (as I wasn't until I fell across it).

  9. Sure, it may take some time though and if people do not start testing with the releases I put up then undiscovered bugs may just compound the difficulty in troubleshooting later on.

     

    I will take a look at adding fuel trucks as fuel sources next.  Although it seems simple, there are a number of potential exploits that need to be dealt with.

     

    After that I will start to look at fuel pumps but that is likely to take some time as the number of valid combinations is likely to be quite complex.

     

    Version 0.51 (beta) is now up on the Git.  Slight cosmetic change so it now displays 100% when full rather than rounding down if amount is greater than 99.4%.  Functionality is unchanged.

  10. Good Day .. Plot Pole for Life 2.44 that sheep is using for his .15 release , is this updated version of yours of another version, dont want to install if a new version is releasing soon

    Please advise  :D

    And Thank you 

     

    Hi,

     

    Thanks for this.  I was unaware someone was redistributing my code.  I will send Sheep a PM when I get home tonight.

     

    To answer your question, I would guess it is my mod but he got the name and version number wrong. 

     

    I also see he is distributing other peoples work including Raymixs Snap Build Pro.  I am guessing Sheep has contacted Raymix as he has a distribution requirements (bottom of his first post in his ).

     

    It really seems like common courtesy but I guess I need to spell it out as well in a license section for this mod.

     

    To be clear, I am fine with people using as they want for their own servers and communities. 

     

    For people wanting to take the code, modify it and redistribute it, I expect to be asked if it is ok to take my code and redistribute it, be named as the author and to have a link back to this thread.  I also expect that the person modifying the code would explicitly state that they are responsible for any support of the modified code. 

     

    Naming me as the original author does not mean using a blanket statement.

     

    A statement somewhere of

     

    "credits to each addon / script creator"

     

    is not acceptable.

     

    "Included mods.

    (Rimblock)."

     

    is fine after the person distributing the code has confirmed it is ok with me.

  11. hey 

     

    i don't know why but i cannot get it runnning. I did exactly the same as the tutorial wanted me to do for some reason everytime i spawn my player has broken legs, 2500 blood, i can't build anything just everything is fucked up. 

     

    My RPT says:

    i have no idea whats going on and as an addition i made no changes inside that file why is he complaining?!

     

    hops somebody can help me out...

     

    I would hazzard a guess that there is an issue with your variables.sqf or your init.sqf calling the variables.sqf.

     

    Both of the files that are listed in that RPT extract are being sourced from the server.pbo file so unless they were modified and then put back in to the server.pbo, it must be something else.

     

    The errors are "Undefined variable" and the variables are defined in the variables.sqf file which is called from the init.sqf int he mission folder.  Make sure it is being called correctly (correct path to the new variables.sqf file etc).

     

    Failing that, it would be good to see the errors that happen before the ones posted in the rpt file.  If you are going to post your RPT file then please use spoiler tags

     

    Spoiler tags:

    Hide large blocks of code / text until comone clicks on the spoiler button.

     

    Put (spoiler) text to hide (/spoiler) around the text you want to hide - change the () to [ ] for it to work.

  12. Hey guys,

     

    I play on a sever and if i try to remove sthg I've built i get this message:

    custom\plotforlivev2\remove.sqf not found

     

    Whats missing on the serve/what can i tell the server admin to do so it works?

     

    Best regards,

     

    Sethz

     

    The path to the remove file in A Plot for Life v2.33 is

    Custom\A_Plot_for_Life\Action\remove.sqf

    It is correct on the Git and I would presume it is correct int he dropbox download as well (will confirm tonight).

     

    If you have moved the file somewhere other than this directory then you need to put that directory in the fn_selfactions.sqf file (line 300 unless you have merged other mods).

     

    Having looked at the first post in this thread, I think you have followed the install instructions for v2.26 and not for v2.33.  The install instructions are in the download file or on the Github repository here.

     

    I have modified the first post to make it clearer.

  13. I've noticed that any player can remove a metal panel, tank trap and barbed wire, is there any way to make it so only the plot pole owner can remove it?

     

    Ok, that is interesting.

     

    Check the ownership of these objects in the DB.

     

    Epoch controls what can be removed by anyone in the following variable found in the variables.sqf (this example is from my A Plot for Life 2.33 code on the Git).

     

     

    DZE_isRemovable = ["Fence_corrugated_DZ","M240Nest_DZ","ParkBench_DZ","Plastic_Pole_EP1_DZ","FireBarrel_DZ","Scaffolding_DZ"];

    If the object is in that array then anyone can remove it.  If the object is not in that array then only the owner / friendlies should be able to remove it (unless it is a wreck).

  14. If you ever need some testing on that, i gladly give my services, i dont have time 24/7 but i can do small things ^^

     

    Thanks Zupa.  We have a lot to do before having something in place that will be worth people looking at but will try to keep everyone in the loop as things progress.

     

    About 2 weeks until the "Due" date for 1.0.6 and it's only 15% complete. I just wish the devs would decide on the fate of A2 Epoch and let us know. I tend not to want to put new scripts on the server close to a supposed release date because I'll be duplicating my work soon after installing them, but if I knew that 1.0.6 isn't coming, at least that would easy my mind and I'm sure a lot of others.

     

    Yeah, I am pretty much wondering why I should convert the latest version of A Plot for Life to A2 Epoch for inclusion in the core build as last time I did it just sat there for 3 weeks with no comments from the devs (Vbawol originally suggested it could be included in response to someone elses comment on the Git issue tracker).  After spending a good deal of time building, testing and making it available for the Epoch mod, just a note along the lines of "Scheduled for verification on XXX" or "thanks, will test and provide feedback" or just something would not seem too much to ask.

     

    The Better Refueling project is probably the last one I will do for A2Epoch.  It is hard to justify the time and effort when the devs are the only ones with control over the codebase and seem to have little interest in further development or spending much time on the A2Epoch community.

  15. How can i get this snaps work with this mod?

     

     

    I'm confused!

     

    I have installed:

    Snap Building Pro v1.4.1

    Build Vectors

    AdminBuild and Plot 4

     

    Link

     

     

    as I upgrade to v2.33??

     

    Guys,

     

    Not quite sure what you mean.

     

    Snap Build Pro 1.4.1 is included with this release.  You do not have to add or merge anything for A Plot for Life and Snap Build Pro to work (if you installed it correctly).

     

    There are variables you need to set in your init.sqf file to turn the functionality on and these are detailed in the install instructions (end of the file).

  16. What do you mean by X processors? Are you referring to cores? Cause Arma 2 requires anything about 3.0GHZ as it starts to bottleneck if its not running more then 3.0 on a single core. I would say you need a min of 4 cores. Since you have to also run the database and windows like to run their services.

     

    Min:

    4 Cores Running at 3.0GHZ

    8Gbz Ram.

    100MB/s Upload/Download Speed.

     

    Yeah, I believe he is refering to max turbo frequency which is dependant on the current number of cores in use and a few other things like power management profile and power / thermal levels. 

     

    For anyone who wants a bit of background reading on Intel Turbo Boost tech have a look here for an overview.

     

    A lot of companies sell processors based on their max boost clock speed and not their actual base speed.  As the max boost speed is directly linked to the number of active cores etc it is fairly missleading. 

     

    i.e. buying an i7-4770 because it is advertised as being 3.9Ghz is fairly misleading as it will not run all 8 threads (4c8t) at that speed.  Using all 4 cores will allow a max of 3.7GHz if power and thermal requirements are met.

     

    CPUz is a pretty good app for indecating your running frequency.

     

    A set of tables detailing what the max boost rating by processor can be found on Intels site here .  These are for i7 processors, just click on the '+' by the type of processor you are intereseted in.  At the bottom are links to tables for i5 cpus.

     

    @Donnovan

     

    The E3-1281v3 goes up to 4.1GHz turbo but is 2-3x the price.  The ram speed is also limited (compared to desktop versions) to 1333MHz or 1600MHz on Xeons.

     

    A dual or tri core E3-1240v3 is a pretty good price performance point I would suggest if you do not want to particually look at overclocking desktop systems.

  17. Small bug highlighted by nkukard on the Git (thanks nkukard).

     

    Wrong variable being checked for take ownership of plot items being active.

     

    Open fn_selfactions.sqf

     

    find

    if (s_player_plot_take_ownership < 0) then {
      if (DZE_APlotforLife) then {

    Change to 

    if (s_player_plot_take_ownership < 0) then {
      if (DZE_PlotOwnership) then {

    I will update the release in the next couple of days.

×
×
  • Create New...