so in bgt it doesn't know the difference between 0 and 1 when saying: array.length. And when I try: if(array_is_empty, but that seems to have no effect. What is the best way of it knowing the different between 0 and 1 items?

Roses are red,
Violets are yellow;
You challenge me to change my signature,
I say oh hell no.

In any programming language, an array is empty if it has 0 items. 1 item, even if it is an array, constitutes a non-empty array. Is there something that you are testing that is not giving the result you expect? If so, please provide a short snippet that illustrates the question.

Thanks!

Kind regards,

Philip Bennefall

Couldn't you just do

array = {"GoT", "Big Bang Theory", "Grey's Anatomy", "The Ranch", "LivePD"};
if (array)
{
//do stuff
}
else
{
//other stuff
}

The inverse would be if (!array). I've done that type of thing in other langs and it worked fine, syntactically matching the other lang's structure of course.

Ironcross is here to expose the fakes and phonies,
Suss out the wheat from the chaff, the cheddar from the bologna,
I'm a superhero, y'all fools needa know this,
So if you on the other side of right, prepare for a fight no one will ever miss.

Nope. You can't do that in bgt.

I'm me. Just me. No one else. Only meeee!

well damn.

Ironcross is here to expose the fakes and phonies,
Suss out the wheat from the chaff, the cheddar from the bologna,
I'm a superhero, y'all fools needa know this,
So if you on the other side of right, prepare for a fight no one will ever miss.

@3
That won't work in  bgt unforchinatly

Blind people were the original humans.
If you needed glasses in the cave man days, how could you hunt?

And that, is why bgt needs updates.

Blind people were the original humans.
If you needed glasses in the cave man days, how could you hunt?

If the OP wants an initializer list, the syntax is:

int[] my_list={1, 2, 3};

Kind regards,

Philip Bennefall

@7 I think it's clear that BGT will not get updates. I think that if you want updates to BGT< you'll have to consult with Philip. I'm not sure of the details, but I guess if you pay him it may be possible for him to make your updates, keyword being may as I am not Philip so can't say. LOL

Sincerely,
Lucas.

na. Been there, done that.

I'm me. Just me. No one else. Only meeee!

I have had several requests from people who want to buy the source code for BGT, but I have turned them down for various reasons which I shall not expand upon here. At this time I don't have any planned updates because I have neither enough time nor enough interest to dive back into it. As I stated in another topic a while back, I recommend people look into other programming languages. BGT was good for what I intended it to do about 10 years ago, but it is not particularly relevant today. If you want to make Windows games and are aware of what the engine can and cannot do, by all means use it. But I personally think it is time to move on and expand the audio games landscape far beyond the feature set of BGT.

Kind regards,

Philip Bennefall

I recommend trying JS or python, because it is clear that BGT will have no updates. Well, it's quite clear now rooofl

Blind people were the original humans.
If you needed glasses in the cave man days, how could you hunt?

So @1, are you confused by the 0 based indexing in arrays? I have never in all my time using BGT seen the length method of an array fail to do what it is supposed to do. I'm almost certain it can not be confused with 0 and 1 items. If array.length returns 0, there are 0 items. If array.length returns 1, there is 1 item. If it returns 0 and you try accessing array[0], it will crash because that element doesn't exist. If it returns 1 and you try accessing array[1], it will also crash because it thinks you are trying to access the second element in the array. Arrays are indexed starting at 0, so if array.length returns 1, the proper way to access that element is by accessing array[0]. Hopefully this helps.

I am a web designer, and a game developer. If you wish see me at http://www.samtupy.com

@13 I already knew. I think I’m just an idiot for not trying if(array.length==0 or 1). I seriously think I thought I did that but haven’t. Maybe I thought but didn’t

Roses are red,
Violets are yellow;
You challenge me to change my signature,
I say oh hell no.