Discussion What was the dumbest thing you've done in Jass?

SineCosine

I'm still looking for my Tangent
Reaction score
77
Just a curiosity, so that we can inform each other of stupid things to not do =x
I just got through something stupid and want to avoid anything else dumb, so..

I'll go first:
My map has A LOT of dialogue (Part of the re-play value is going to come from the different dialogue you get each time you play, it's like a story/hero-survival..)
And I did something like this for EVERY bit of dialogue..

JASS:

    static method Chat10 takes nothing returns nothing
        local timer t = GetExpiredTimer()
        local integer i = 0
        
        loop
        exitwhen i == 4
            call DisplayTextToPlayer(Player(i), 0, 0, "|cffffcc00Current Objective: |r")
            call DisplayTextToPlayer(Player(i), 0, 0, "01) Find the cause of the rumblings.")
            call DisplayTextToPlayer(Player(i), 0, 0, "     ")
        set i = i + 1
        endloop
        
        call OneStart()
        call DestroyTimer(t)
        set t = null
    
    endmethod


Then, while droning and repeating this task, something struck me..
Libraries

So, I went and made my library and now, each sentence goes something like this..

JASS:

static method Chat3 takes nothing returns nothing
            call ShowChat(true, "|cffffcc00Orc Tamer: |r", "Maggot-brain scrawn..", null, null, GetExpiredTimer(), 3.00, function G.Chat4)
            call AllSelectUnit(Talk)
            call MoveCameraAll(GetUnitX(Talk), GetUnitY(Talk), 0.5)
        endmethod

So much shorter..

What was the dumbest thing you've done in Jass that you can remember? :thup:
 

SineCosine

I'm still looking for my Tangent
Reaction score
77
It takes a string ._.

How does ExecuteFunc work anyway and what does it do? o.0
 

SineCosine

I'm still looking for my Tangent
Reaction score
77
Thanks..

And &^@($%&#^@ you !!!!!111oneone!!111oneoneone
I just lost the game, damn.
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
I've done too many dumb things in JASS to count. Some things that particularly stick out though, is when I spend ages looking for the reason for a crash, and then I realize I forgot to set i = i + 1 in a loop. :p
 

Tyrulan

Ultra Cool Member
Reaction score
37
Most of the mistakes made in JASS or common throughout all programming languages. Most mistakes I've made are null pointer errors or operator errors. Such as class hierarchy (extends) and (implements) interfaces. ><
 

Narks

Vastly intelligent whale-like being from the stars
Reaction score
90
but there is a lot of failtraps that are specific to JASS (some of them crappy native bugs)

like using ExecuteFunc, looks awesome, but in reality is really really bad
 

jig7c

Stop reading me...-statement
Reaction score
123
i tend to forget to write [lJASS]endfunction[/lJASS] at the end... and i go thru the code over and over again, not realizing that...
 

ReVolver

Mega Super Ultra Cool Member
Reaction score
608
I guess when you use Orc Tamer, I'm the dumbest thing I've done lol
 

Sevion

The DIY Ninja
Reaction score
413
I'll write [ljass]endfunction[/ljass] to end a method and wonder why my script won't parse.
 

Jesus4Lyf

Good Idea™
Reaction score
397
  1. Use ExeuteFunc, dynamic triggers, dynamic units, and H2I/gamecache attachment all together to make menus above the heads of units do to things like throwing items to them. Really cool idea! I just didn't expect the undocumented behaviour of doom, which was that things suddenly started failing after a while. Probably to do with execute func having delays, dynamic triggers having leaks and double frees, and H2I/gamecache being slow and having double free potential as well.
  2. In editing a map with an MPQ archiver and notepad, I wrote a massive function, saved it, and wondered why the map would not start. I did not have a syntax checker. Through commenting out large chunks of it, I narrowed it down to two lines on which I had written [LJASS] if ...[/LJASS] and forgotten the [LJASS]then[/LJASS].
  3. Implemented a linked list of ability ids in GUI by converting ability ids to rawcodes (strings) and then appending them together into one big string. Actually, this worked really well. :D
  4. Trusted vJass inheritance features.
  5. Typecasted 0 to a function interface and fired it (caused some unknown behavior).
  6. Starting KT2 instances periodically from within KT2 (very self defeating, seeing as the KT2 "Add" function is fairly slow - it's the iteration speed which kicks ass).
  7. Used TriggerExecCount attachment for attaching rather large integers to triggers at run time.
  8. Assuming that vJass features and JASS native features are scalable to large systems. Trust me on this - no matter how tight you write your code, you'll find some new oddity with something somewhere which will frak it all up.
  9. Benchmarked speed differences between locals and globals. >_<
  10. Written actual map specific code with an efficiency focus. ... Just don't. -.-
And that should give you some indication as to why I learned to write all my own stuff. :cool:
 

Weep

Godspeed to the sound of the pounding
Reaction score
400
What was the dumbest thing you've done in Jass that you can remember? :thup:
I keep writing "&&" instead of "and", and forgetting the "then" after an "if".

Recently, I assumed that TimerUtils in hashtable mode would allow use of unlimited timers, but it's still limited to a preset quantity. Also recently, I assumed that popular systems on WC3C would play nice together without actually testing it before modifying all my code to use them. x_X
 

SineCosine

I'm still looking for my Tangent
Reaction score
77
I, too, forget my thens after my ifs =/

[EDIT]
Also, creating my own functions and then forgetting to pass enough arguments to those functions =/
And forgetting what arguments those functions take =(
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top