Doom Angel's Question Thread

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
man u are driving me crazy..........

i know what arrays are and how to use them im just asking about this option when u create a variable and u add an array u got number to put in whether it's 1 or 100 now im asking what's the difference beetwen if i put 1 or 50 or 100 what each of them will actually limit me for or something like that
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
I don't think the actual number matters. I doubt it affects the functionality at all.
 

BlackNerubia

New Member
Reaction score
12
Array

By Default the Array is set to the Number "1" in the box, witch means the enabled about of options on the array would be Two heres how

Set Array[0] to 345
Set Array[1] to 543

so basicly you start with a total of 2 spots for variables, as for the limit on them, there is none, so basicly the [#] is just for how many variables you need stored.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
but i seen some tutorial maps (e.g: Effena's Save\Load Code) where the variable where some 100 some 4 and etc..... and i wonder if there is any effect at all doing it?
 

BlackNerubia

New Member
Reaction score
12
Nope, they do that basically so if they need more room they have it so they dont by mistake go over the amount, the reason they are set low is to save space because every additional variable added to the array is just that much more space taken. but basically its personal preference how many you have set to max, as long as you don't use more then the max amount set.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
so it does limit u for the number of integers u can put in?
like if i have 1 it limits me up to 100 and 4 is 400 while 100 is 10000?
 

BlackNerubia

New Member
Reaction score
12
Im not sure i understand but ill say what i think you mean, what your saying is that if you set the array size to 1, your maxium is 100, if thats so Then no that is not correct, when you set it to one, it means you have Zero, as well as the Number One to store info on, the limit in those to variables is infinate so you can do things such as this

set Array[0] to 1000000000000000... etc etc
set Array[1] to 1112344543676565

Correct me if im rong but i think thats what you mean.
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
In case you would refer to the size setting in the variable editor, yes, it does have a purpose.
The array gets initialized up to and including size elements with the default value, starting at 0.

I.e. if you declare an array of integers with size 3 and a default value of 42,
your map will start with array[0] = array[1] = array[2] = array[3] = 42.


Other than that, all arrays have the same maximum number of elements: 8192.
Regardless of size.


And, trying to do any kind of work with uninitialized values is a sure way not to get the expected result.
 
S

Sunny_D

Guest
well, i dont get what difference you are seeking here. the index doesnt affect the value inside the variable or its dimensions. the index [] is just an adress to different variables.

MyReal[1] has no difference to MyReal[100] except the fact that its another variable. you can as well - although it would be nonsense - define two variables instead: MyReal1 and MyReal2. as i said, think about the index as an adress.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
hmmm u are mistaking by what i meant i guess u didn't seen my previews posts like this one:
man u are driving me crazy..........

i know what arrays are and how to use them im just asking about this option when u create a variable and u add an array u got number to put in whether it's 1 or 100 now im asking what's the difference beetwen if i put 1 or 50 or 100 what each of them will actually limit me for or something like that
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> what would be the changes beetwen 100 and 1?

About 99.

> I guess you didn't see my previous posts like this one

My actual guess would be that we did see them.
And, either we have no idea what you're talking about, or you're not reading the replies you get.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
im just asking about the variable array itself not the index the index doesn't interest me at all just the number u put in the array when u create a variable now back to the old question:
what would be the changes beetwen 100 and 1?
btw the numberical change is not realy what i look for (im not that dumb :p)
 

Ghan

Administrator - Servers are fun
Staff member
Reaction score
889
Having different numbers like 1 or 100 does not affect the array's functionality at all. It will work equally well with either number.
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
so why did blizzard created this function for?
they could have just make an option to put array without entering size....

there must be some use of it or any limitation of any sort which it puts for every size....
 
S

Sunny_D

Guest
hm... can someone break this language barrier? sry, but if i read your posts i always think, "what else does he mean if not the index? what function?". probably it helps to clear up the situation if you give us exact examples, what you want to be compared with eachother? :)
 

Doom-Angel

Jass User (Just started using NewGen)
Reaction score
167
k since u asked for clear question which everybody would understand i will use pictures:

here's the the first one when i create a variable and the current size is 1




now in this picture i changed the size to 50:




and in this one i changed to 100:




now what i ask is what the difference beetwen choosing 1 or 50 or 100? :confused: :confused:
 

Exide

I am amazingly focused right now!
Reaction score
448
Um.
I believe 1 array takes up the same amount of space as 1 variable.
So that means you have 1, 50 and 100 variables in one.
The only difference is that one is larger than the other, thus can contain more info.
Isn't that obvious, or did I get something wrong? :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top