Recent content by Chris B

  1. C

    Static Variables Inside Functions

    _welp, I specifically said I'm not referring to globals, I'm talking about a variable that is kept in local scope, can ONLY be used by THAT function, but isn't reset when you exit. For instance, you could use this same variable name in two different functions but the variables are different for...
  2. C

    Static Variables Inside Functions

    So I was going through and wondering of you can cast static local variables inside of functions. For those who don't know what I'm talking about, these are basically local variables that aren't deleted when you exit the function (static local variables). I doubt this is a feature of JASS, and...
  3. C

    Type Casting Functions

    Alright thanks AceHart, that's all I knew about and wasn't sure if there was an alternative. It's close enough, Blizzard put that functionality there for a reason :) The only thing is, can't converting ints to bools like that cause unkown results sometimes (at least in other languages), or is...
  4. C

    Type Casting Functions

    Hey, type casting in JASS seems easy when called via functions, if it's not one of the few supported through premade functions, such as I2S. I've been wondering though if there's a function available premade for converting an integer to a boolean. If not, I'll just create a function, it just...
  5. C

    multiple attacks?

    You should be able to set attack 1 with a min/max range for melle and attack 2 with a min/max range, those of which should not collide with eachother lol. Not sure if this would work though :/ You can always use a spell which changes it as well. Again, I'm not sure if the first will work...
  6. C

    Raise to the power of N

    Alright, thanks Romek! I'm sure I won't need that, but always good to know it's there...I'll just stick with loops unless I need. Though wouldn't it be best, when using negatives, to just flip the answer? Like, if you have 5^(-2), wouldn't it be more effecient to find the abs value of -2...
  7. C

    Raise to the power of N

    Hey guys, is there a built in function that can do as the title says, such as 5^3 (5*5*5)? If not, I can just use this function I made up, but if something is already there, I might as well use it. function power takes integer a, integer b returns integer local integer count=1 local...
  8. C

    Communicating with a server, possible?

    Alright, thanks guys. Wish it was easier lol, but maybe something fun to mess with later. -Chris EDIT: BTW, Romek, this can be for many different reasons. You can save rpg games without a load key, save game wins for a multiplayer map and load statistics, or even have on-site registration...
  9. C

    Communicating with a server, possible?

    Hey guys, I doubt this is supported by the WE or WEU, but is there a way to communicate with a database such as MySQL? If I could securely write info, that'd be awesome, but if only reading is possible, that'd be cool too :) What about accessing a URL though, such as...
  10. C

    And/Or in If statements?

    Ok cool, thanks guys, +rep to both. So, I was also wondering though, what about using && and || instead of AND and OR, is this preferred, supported, or what? If nobody knows, I'll check in the morning. @Tyrande Ok, I thought so....I really don't understand why the WE wastes it's resources...
  11. C

    And/Or in If statements?

    Hey guys, I could test for this, but if someone knows, you'll save me a lot of time lol. Are you suppose to be able to use AND/OR statements in JASS If statements? I know you can like use GetBooleanAnd(statement,statement), but is there a way to just go like if(staement AND statement)? Also...
  12. C

    Sci/Tech Why Mirroring Is Not a Backup Solution

    Don't think so, data can only be recovered if it exists on the drive. If you delete data, yes, you can restore it. Once you overwrite it, that's another story. That's why programs which completely destroy data will overwrite that specific area with random 0s or 1s. When you delete it, btw...
  13. C

    Name of unit

    In the World Editor's menu bar (file, edit, etc) Click on this: Scenario --> Player Properties From there you can change the name of players. I don't think you can rename Nuetral Passive's player name though, sorry. If you have an extra slot, you can use that :/ -Chris
  14. C

    Looping multiple times using IntegerA

    Cool, thanks for the rep, glad I could help :) But yea, I did some minor modifications which made a huge difference lol. It was all a matter of moving things around :) -Chris
  15. C

    Looping multiple times using IntegerA

    <@Chris Thats a good idea, well ofcourse unless its ofset by what kelvin said, and i tested it. The thought of the trigger is a good idea, except if you think carefully, you'll see that what that trigger will actually do is have one location spawn 1 at a time every 2 seconds to make 15...
Top