Largest in array?

Status
Not open for further replies.

DrStyles

New Member
Reaction score
7
And if there are more then one lowers/highest value im guessing it will choose lowest one in the array?

array[1] 100
array[2] 90
array[3] 100

would choose #1?
 

Sevion

The DIY Ninja
Reaction score
413
array[3] for highest
array[2] for lowest

Here's its train of thought:

(Highest):
Highest = 0
Is array[1] >= Highest? Yes. Highest = array[1]
Is array[2] >= Highest? No.
Is array[3] >= Highest? Yes. Highest = array[3]

(Lowest):
Lowest = 999999999 (Or some kind of max threshold)
Is array[1] <= Lowest? Yes. Lowest = array[1]
Is array[2] <= Lowest? Yes. Lowest = array[2]
Is array[3] <= Lowest? No.

A way to make Lowest always detect the correct value regardless of the value, set Lowest = array[1] first then start the loop at 2.
 

Lightstalker

New Member
Reaction score
55
1) GUI IS JASS. If something is disabled in JASS, it will be disabled in GUI too.

2) There is no array limit. It can be bypassed by doing this:

JASS:
globals
    integer array i[10000]
endglobals
 

DrStyles

New Member
Reaction score
7
K ty :) to lazy to test it, but i hope i did it right.

GUI IS JASS. If something is disabled in JASS, it will be disabled in GUI too.
If GUI was Jass neither GUI or JASS could exist, because it would be GUI not jass or jass not GUI. GUI is limited, so if something in GUI is disabled the same thing is JASS is (though there may be a way around it) though if something in JASS it is disabled then the same is disabled in GUI IF that same function exists in GUI.
 

Rainther

I guess I should write something of value here...
Reaction score
61
K ty :) to lazy to test it, but i hope i did it right.


If GUI was Jass neither GUI or JASS could exist, because it would be GUI not jass or jass not GUI. GUI is limited, so if something in GUI is disabled the same thing is JASS is (though there may be a way around it) though if something in JASS it is disabled then the same is disabled in GUI IF that same function exists in GUI.

The point given is that GUI is Jass codes in an other interface which happends to be more limited.
 

DrStyles

New Member
Reaction score
7
1) GUI IS JASS. If something is disabled in JASS, it will be disabled in GUI too.

if something in GUI is disabled the same thing is JASS is (though there may be a way around it) though if something in JASS it is disabled then the same is disabled in GUI IF that same function exists in GUI.

So far everything I've done in GUI works fine. I have not needed to use JASS to "bypass" GUI errors.

The point given is that GUI is Jass codes in an other interface which happends to be more limited.
What is your point though?
True, but it is not the same, otherwise there would be no point. One you type the other you click, lol. GUI is Jass codes, but much more user-friendly, though obviously more ""limited"". I have never been stuck by a "limit" in GUI, because it hold all the useful (and not so useful, like hash tables) codes.

Neither is "better", though GUI is more limited, good maps can be made with the GUI provided by the normal WE or though 3rd party programs allowing extensions not only to GUI, but to other aspects of the WE as well.
 

Sevion

The DIY Ninja
Reaction score
413
Hashtables are useful. Give me 3 good reasons they aren't.

(v)JASS is byfar the better. Reason: GUI is limited and very inefficient.
 

Rainther

I guess I should write something of value here...
Reaction score
61
People tend to like different stuff, that's why some prefer Jass and some prefer GUI. Personally I have a much easier time handeling Jass then GUI.

Because GUI is build the way it is I can't help to feel trapped in it, constantly clicking my way through options and not being directly able to use simply custom-made functions.

But in Jass I can make myself a really neat funtion which could for instance calculate the unit with smalliest health simply by typing "call Calc(Group)". (Of course I have to declare unit group etc. but in the end it's really that simple)

The only reason why I dislike GUI is that it's hardier for me to help people in it since I'm used to Jass. Plus it feels like my eyes are bleeding sometimes when I see peoples GUI codes. :D
 
Reaction score
333
So far everything I've done in GUI works fine. I have not needed to use JASS to "bypass" GUI errors.

You ought to read about memory leaks.

What is your point though?

The point is that the patch didn't break Jass. It broke code that used the return bug. If the patch had broken Jass, then every map would be broken, because every map uses Jass. GUI is just an interface to Jass.

True, but it is not the same, otherwise there would be no point. One you type the other you click, lol. GUI is Jass codes, but much more user-friendly, though obviously more ""limited"". I have never been stuck by a "limit" in GUI, because it hold all the useful (and not so useful, like hash tables) codes.

Here is a puzzle: How can you recognize the limits of something if those limits provide the context in which you think about that thing?
 

DrStyles

New Member
Reaction score
7
You ought to read about memory leaks.

I have. Like I said I'm not a noob. Easily fixable with a custom script. Point taken. Very little amount of Jass, mostly GUI.

Neither is "better", though GUI is more limited, good maps can be made with the GUI provided by the normal WE or though 3rd party programs allowing extensions not only to GUI, but to other aspects of the WE as well.

You don't need Jass to fix leaks. (In the sense of custom scripts, though I use custom scripts myself.)

Hashtables are useful. Give me 3 good reasons they aren't.

(v)JASS is byfar the better. Reason: GUI is limited and very inefficient.

GUI is inefficient? Give me 3 reasons.

Hashtables: ok. Maybe useful for some people, though seems most maps got along fine without them. They aren't bad except the fact that they are the first thing to show up, and often get in my way. I find no use for them in any of my maps so far, but I wouldn't mind if they weren't the first option on the list, where as before arithmetic or concatenate strings was.

People tend to like different stuff, that's why some prefer Jass and some prefer GUI. Personally I have a much easier time handeling Jass then GUI.

Because GUI is build the way it is I can't help to feel trapped in it, constantly clicking my way through options and not being directly able to use simply custom-made functions.

But in Jass I can make myself a really neat funtion which could for instance calculate the unit with smalliest health simply by typing "call Calc(Group)". (Of course I have to declare unit group etc. but in the end it's really that simple)

The only reason why I dislike GUI is that it's hardier for me to help people in it since I'm used to Jass. Plus it feels like my eyes are bleeding sometimes when I see peoples GUI codes.

More people can use GUI then Jass. They just have to find the trigger editor. Very simple interface. And your eyes bleed? Well GUI looks much more peasant then amateur Jass users. Tons of pages of unorganized script. GUI does it for you.

Here is a puzzle: How can you recognize the limits of something if those limits provide the context in which you think about that thing?

I don't think in those limits. I think that I want to make a map, and GUI can do that for me. Here is a puzzle for you: If a trigger is made that displays to all players "hi", and the same thing in Jass, does the Jass somehow look better, or so you get the exact same result?
Unless your one of those DoTA addicts, I don't see how you can't understand a map in GUI can be just as good as a map in Jass.
 

Sevion

The DIY Ninja
Reaction score
413
GUI is inefficient? Give me 3 reasons.

You didn't just try to beat me with that. Ha.

1. BJ's
2. Extra functions created
3. Conditions are made in the most retarded way.

You never fully answered my 3 reasons. You gave one reason.
 

Azlier

Old World Ghost
Reaction score
461
>Well GUI looks much more peasant then amateur Jass users. Tons of pages of unorganized script. GUI does it for you.

GUI is terribly unorganized and messy. Events, Conditions, Actions. That's really the best organization you can get. You can't even take advantage of a nice Jass feature called 'function'.

Jass also has these nice organizational tools called scopes and libraries. Everything is nicely and neatly organized. In GUI, you have miles and miles of redundant code.

>You don't need Jass to fix leaks.

You do realize that custom scripts ARE Jass, right?

>GUI is inefficient? Give me 3 reasons.

See Sevion's post.

>More people can use GUI then Jass.

Because people think it so hard to use. But, vJass is easier to use than GUI.

>I think that I want to make a map, and GUI can do that for me.

There are so many things you can't take full advantage of in GUI. The obvious ones are trackables and structs.

>I don't see how you can't understand a map in GUI can be just as good as a map in Jass.

See above.
 

Azlier

Old World Ghost
Reaction score
461
Yes. GUI is limited Jass, while Custom Script has less limits since you put in straight Jass code.
 

DrStyles

New Member
Reaction score
7
>GUI is inefficient? Give me 3 reasons.

See Sevion's post.

Lol you don't need to tell me to read another post.

1. BJ's
2. Extra functions created
3. Conditions are made in the most retarded way.

If a trigger is made that displays to all players "hi", and the same thing in Jass, does the Jass somehow look better, or so you get the exact same result?

GUI is terribly unorganized and messy. Events, Conditions, Actions. That's really the best organization you can get. You can't even take advantage of a nice Jass feature called 'function'.

Jass also has these nice organizational tools called scopes and libraries. Everything is nicely and neatly organized. In GUI, you have miles and miles of redundant code.

GUI is not hard to read. No clue what your talking about. Yes JASS can be more organized, but many users don't take time to do that. My point was in cases like these, it is harder to help people, but with GUI, the format is always the same, so you can help people easier.

>More people can use GUI then Jass.

Because people think it so hard to use. But, vJass is easier to use than GUI.

Doesn't change the fact. Why should I use vJass when it's all going so great in GUI. No thx but I'm fine with GUI.

There are so many things you can't take full advantage of in GUI. The obvious ones are trackables and structs.

Don't need Jass for a good map.

>You don't need Jass to fix leaks.

You do realize that custom scripts ARE Jass, right?

Of course I know that. :) You don't need custom scripts to remove leaks, but you do need JASS, because GUI is sissified JASS. Don't try to fool me =P You said it yourself.
Yes. GUI is limited Jass, while Custom Script has less limits since you put in straight Jass code.
 

Sevion

The DIY Ninja
Reaction score
413
"but many users don't take time to do that"

It's called indentation. NewGen auto-indents...

>Why use vJASS
GUI Suscks.

>Don't need JASS for a good map
Um. Lol. Then you don't need GUI.
 
Reaction score
333
You don't need Jass to fix leaks. (In the sense of custom scripts, though I use custom scripts myself.)

Without modding the GUI, you do need Jass to fix leaks. That is what you type into the Custom Script box. GUI simply doesn't come with the functions you need to eliminate leaks (so no, GUI does not hold all the useful codes).

GUI is inefficient? Give me 3 reasons.

Convert to Custom Text and see for yourself. Even the simplest GUI triggers are inefficient. In practice, this is made worse by the fact that GUI users must resort to kludges in order to work around the lack of features (such as using triggers in lieu of functions).

Hashtables: ok. Maybe useful for some people, though seems most maps got along fine without them.

That is because maps were using gamecache or arrays to emulate hashtable functionality. GUI is so limited in its abilities that it is usually hard for users to understand why attachment systems exist at all.

They aren't bad except the fact that they are the first thing to show up, and often get in my way. I find no use for them in any of my maps so far, but I wouldn't mind if they weren't the first option on the list, where as before arithmetic or concatenate strings was.

This is a consequence of the silly GUI method of programming. Selecting options from drop-down lists is much more tedious than simply typing what you want.

More people can use GUI then Jass. They just have to find the trigger editor. Very simple interface. And your eyes bleed? Well GUI looks much more peasant then amateur Jass users. Tons of pages of unorganized script. GUI does it for you.

GUI does not look pleasant to me. It is not pleasant to read, and not pleasant to write. The one advantage that GUI has over Jass is that it is easy to learn, and that is why people use it.

I don't think in those limits.

Of course you do. It is not something you can help, without having fully experienced the alternatives.

I think that I want to make a map, and GUI can do that for me.

You can make a melee map without using GUI or Jass. Obviously there is more to making a map than clicking the Save button.

Here is a puzzle for you: If a trigger is made that displays to all players "hi", and the same thing in Jass, does the Jass somehow look better, or so you get the exact same result?

If displaying "hi" to all players represents the extent of what you want to do in your maps, then it probably isn't worth learning Jass.

Unless your one of those DoTA addicts, I don't see how you can't understand a map in GUI can be just as good as a map in Jass.

There is nothing to "understand" in that regard. Jass is simply better than the GUI. It is faster to write, more efficient, more capable and more flexible. Not all Jass maps are better than GUI maps, but there are some things that it is simply not feasible to do in GUI (without copious amounts of Custom Script). Since you brought up DotA, why do you think that it is written in Jass rather than GUI?
 
Status
Not open for further replies.
General chit-chat
Help Users
  • No one is chatting at the moment.
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though
  • Ghan Ghan:
    Heard Houston got hit pretty bad by storms last night. Hope all is well with TH.
  • The Helper The Helper:
    Power back on finally - all is good here no damage
    +2
  • V-SNES V-SNES:
    Happy Friday!
    +1
  • The Helper The Helper:
    New recipe is another summer dessert Berry and Peach Cheesecake - https://www.thehelper.net/threads/recipe-berry-and-peach-cheesecake.194169/

      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