Poll

Environment saving/loading?

yah
50 (98%)
naw
1 (2%)

Total Members Voted: 50

Author Topic: [Server] Autosaver - [Version 3.0.0] - Javascript version??!!! (tba)  (Read 30832 times)

Sometimes when I load this via oRBs, the preferences would usually show up on some occasions, then the next time I set up the server, I don't see them at all. Yes, I have used the RTB to oRBs converter.

This will not convert to oRBs properly because what they do is they have a copy of a file that has RTB support in their database and they manually edit it to put the oRBs system in.

I'll update it when I fix the other issue to support RTB and oRBs.

This will not convert to oRBs properly because what they do is they have a copy of a file that has RTB support in their database and they manually edit it to put the oRBs system in.

I'll update it when I fix the other issue to support RTB and oRBs.

Alright, hopefully it gets updated soon. This add-on is mighty useful.

Yeah, it's saving my cityrpg build which is awfully a good amount of bricks.

For anyone that saves client-sided they would have to ghost every brick before they could save because client saving is based on what you ghost. Of course there are other brick saving add-ons out there for your server, but do they have as much freedom as this one does?

Can you use $Pref::Server::AS or something similar so the prefs are in their correct spot in server/prefs.cs?

EDIT: and can setting the interval to 0 actually disable the auto-saving like any other addon would do
i mean really

EDIT2: you're also not exporting prefs right, nothing important is ever exported


EDIT3: i've had to patch quite a few things, i might go ahead and fix everything wrong and post it
« Last Edit: November 11, 2015, 09:17:03 PM by TheBlackParrot »

The only thing that exports is the last autosave name, RTB seems to be breaking the preferences and it's pissing me off. Some mods don't do $Pref and it works fine.

Also notepad isn't a good way to search for things because sometimes it doesn't find it correctly, but also it only searches in one direction. Use notepad+ or sublime text 3 (which is what I use)

I chose to not use $Pref:: because if the server crashes or quits unexpectingly the pref may not save.

I'm just going to make a /autosaver command so you can modify the prefs, I'm sick of using mods that don't fix the prefs. Mind as well make the other prefs save. Unless someone has a better option.
« Last Edit: November 12, 2015, 10:53:52 AM by Kyuande »

Blockland Glass is already using this if you want to switch to it. RTB's dead, and I can't forsee oRBs actually fixing anything considering it's pretty much GRTB all over again at this point, nor any of the stripped down RTB versions.

I've also never seen $Pref::x::x not work, you could always just throw in a 5 minute schedule to auto-export prefs somewhere as well. It's just more convenient to have every pref in one spot.

I can still post everything I've had to patch later tonight if you want me to.

I can still post everything I've had to patch later tonight if you want me to.
Please do, I would like to see what you fixed.

How would I implement Blockland Prefs correctly? Can I see an example?


Please do, I would like to see what you fixed.

How would I implement Blockland Prefs correctly? Can I see an example?

registerBlocklandPref(%addon, %title, %type, %variable, %default, %params, %callback, %icon, %legacy)
so for example, you might do
registerBlocklandPref("Autosaver", "Interval", "int", "$Server::AS::interval", $Server::AS::interval, "1 16 0", "", "brick_go", 0);

I need to work on a reference, my bad. Everything related to that function's arguments are in server.cs
use this for %icon

Please do, I would like to see what you fixed.
quick update (just got home a bit ago), still fixing things

so far i've came across:
  • excessive amounts of singular letter variables, this doesn't speed things up or slow things down and just confuses everyone
  • unneeded conversions (24h time -> 12h time), if you can't decipher 24 hour time, you shouldn't have passed 5th grade
  • bad error traps
  • limiting delays to 6 digit numbers (echo(mFloor(999999+1)), try it)
  • not exporting actual preferences correctly (variable pattern leaves out things)
  • not even using $Pref (let the game handle it, if it crashes then this should be left what it was)
  • commands limited to super admins with no setting to change it


EDIT: r u srs


EDIT2: add "not even using certain prefs" to that list

EDIT3: forgettons of for loops when you save, viso isn't checking for isPlanted on bricks to see if they're temporary, but instead loops through the clientGroup. he is checking, but still looping regardless (???????)
imagine 24 players with 20000+ bricks, yeah
(Server_AS1_nextBrick)

EDIT4: you're saving mechanism is so confusing it's giving me a headache

EDIT5: you also know you can reuse file objects right? you don't have to delete them, just close them.

EDIT6: what is with you and your useless if statements lol


EDIT7: add "using global variables where local variables would suffice" to the list as well

EDIT8: so those of you having auto saves running at midnight really need to double check things, viso believed 00:00 was 1 am. it is 12am.
EDIT8.1: i've had to change/patch so many things i sincerely hope the original version is CRC'd
EDIT8.2: this is how you convert 24h to 12h, it is seriously this easy

« Last Edit: November 12, 2015, 10:57:30 PM by TheBlackParrot »

Just remember I didn't originally make this, but didn't realize seeing these issues.

Oops, that AM/PM parser really sucked, I got that from another script because I was too lazy to fix it.

When I get back on my computer, I will consider these. I need to do more practice on statements because it seems I overcomplicate that.

Just remember I didn't originally make this, but didn't realize seeing these issues.

Oops, that AM/PM parser really sucked, I got that from another script because I was too lazy to fix it.

When I get back on my computer, I will consider these. I need to do more practice on statements because it seems I overcomplicate that.
i'm about to post what i fixed and modified and etc., testing it at the moment

events were completely broken btw, parameters were not given their own field separate from the eventOutput, it was just @'d


Sometimes, I see that my autosaver saves normally from time to time, then from server restarts to the next day, it won't notify me of the autosaver saving my changes to my map. I check the console and it doesn't say anything about the autosaver's message.

I also got to the autosaver folder to check if any BLS files were recently made, sadly none were made. I may have to revert to my previous autosaver until these bugs are patched.

which one are you using? the one in the OP or the patched one above?