Author Topic: How to obtain a list of all variables  (Read 1731 times)

I did export("$*","config/allexport.cs"); , it wrote a long file, but the list was cut off at line 5417
Code: [Select]
$OutputEvent_parameterListfxDTSBrick_42 = "list Unrestricted 0 Admin and blockland froze.
Can someone tell me how to get a list of all variables, or export one (with a server running) and give it to me?
« Last Edit: January 20, 2013, 06:27:33 AM by Zeblote »

Try typing $ in the console and then mashing the tab button.

First, why in the world do you have a metric ton of add-ons and why are you even trying to get a global variable list with add-ons enabled? The latter question is because, as a good rule of thumb, you should run these kinds of things on a fresh copy of Blockland so you don't have to wade through 50 million things add-ons added and so you don't end up relying on functions/variables from certain add-ons.

Second,
Try typing $ in the console and then mashing the tab button.
Please tell me your joking. I think you are but I just want to make sure.

Third, here. It took me maybe half a second to generate that list and so, once again, look at my first point.

Please tell me your joking. I think you are but I just want to make sure.
Why would I be joking? That works doesn't it?
I'm assuming he's looking for only a few variables.

Of course it would help if he knew what letter it started with.

Why would I be joking? That works doesn't it?
I'm assuming he's looking for only a few variables.

Of course it would help if he knew what letter it started with.
the list was cut off at line 5417
Yes, it does work; however, if he's only at O with 5417 lines, he's going to be tabbing for quite some time.

He was asking for a list so I assumed you were telling him to tab, copy, paste over and over into a text file. If it only for a few variables, then yes your method would work semi-efficiently.

Yes, it does work; however, if he's only at O with 5417 lines, he's going to be tabbing for quite some time.

He was asking for a list so I assumed you were telling him to tab, copy, paste over and over into a text file. If it only for a few variables, then yes your method would work semi-efficiently.

With 50 variables, he'd have to press tab 1275 times.

First, why in the world do you have a metric ton of add-ons and why are you even trying to get a global variable list with add-ons enabled? The latter question is because, as a good rule of thumb, you should run these kinds of things on a fresh copy of Blockland so you don't have to wade through 50 million things add-ons added and so you don't end up relying on functions/variables from certain add-ons.
Where would I obtain a fresh copy?

I have lists of variables from r1682

http://blocklandcloud.com/resources/r1682_server_variables.txt

Yes, I get the same issue with crashing.

Where would I obtain a fresh copy?

BlocklandLauncher.exe -profilePath path/to/your/new/fresh/copy

If you still wanted to obtain them all, you could do this:
Code: [Select]
function saveAllVariables(%directory) // usage saveAllVariables("config/variables/");
{
if(getSubStr(%directory, strLen(%directory)-1, 1) !$= "/")
%directory = %directory @ "/";
%alphabet = "abcdefghijklmnopqrstuvwxyz";
for(%i = 0; %i < 26; %i++)
{
%character = getSubStr(%alphabet, %i, 1);
%search = "$" @ %character @ "*";
%file = %directory @ %character @ ".txt";
export(%search, %file);
}
echo("Saved all files to: " %directory @ "[a..z].txt");
}

It may not be the easiest solution to read through them but as long as you don't have 5,000 variables under one letter it will work, and they'll be well sorted too.