Jump to content

Adding more than 2 admin


wrt12345

Recommended Posts

I am trying to add a 3rd admin too epochah.hpp

 

using this ------ adminMenu_Owner[] = {{"STEAMID64","ADMINNAME"},{"STEAMID64","ADMINNAME2"}}; 

 

The Question is, how do i add a 3rd person it just seems to hang when i add 3rd person, i have tried this format

 

 

{{"STEAMID64","ADMINNAME"},{{"STEAMID64","ADMINNAME"},{"STEAMID64","ADMINNAME2"}}; 
 
or {{"STEAMID64","ADMINNAME"},{"STEAMID64","ADMINNAME"},{"STEAMID64","ADMINNAME2"}}; 
 
Does anyone know what the correct format is ?
 
thanks in advance
 
 
Update: Worked It Out 
 
{{"STEAMID64","ADMINNAME"},{"STEAMID64","ADMINNAME"},{"STEAMID64","ADMINNAME"}};
Link to comment
Share on other sites

A bit bored at work so thought I'd contribute to this topic a bit. Maybe it will help someone else in future.

 

What you just encountered is what's called "nested arrays". It's quite simple and effective programming concept, frankly a bit hard to read if you don't have trained eye. Programmers can easily read trough brackets while scrolling, but they are just human beings and still make mistakes, typos, misses brackets etc... which is normal... and part of fun!

 

 

I will start by going one step backwards - a variable.

A variable can be anything - a defined string, code block or simple decimal digit... for example:

a = 1;

a is a variable with value of 1

 

a = "apple";

a is a variable with string value of "apple"

 

a = {b=1;};

a is a function (code block) that defines variable b when called.

 

a = [1,2,3];

a is a variable of multiple values. Each value can be accessed, changed or more values added/removed. But this is where the fun starts...

 

a = [1,2,3];

b = [x,y,z];

a and b are independent arrays and have nothing to do with each other.

 

a = [[b,c,d],[1,2,3]];

over here we just nested 2 arrays within one large array

 

a = [[["valueception"]]];

although this makes no sense, it's still legit nested array (select 0 select 0 select 0). A string within array within array within array.

 

a = [["a","b","c"],[[1,2,3],[x,y,z]]];

I will end with this one - nested array within nested array. 123 and xyz are 2 arrays nested together under larger array, which in return is nested within even larger array also containing abc strings

 

As you can see, it's all about position of brackets.

 

Alright back to work for me now...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Discord

×
×
  • Create New...