[JASS] Is it just me?

Status
Not open for further replies.
Level 7
Joined
Jun 16, 2008
Messages
327
Good day, fellow mappers of The Hive,
Lately, I've been very active with mapping and am currently working on an ORPG, but this is not what I'm going to focus on. You see, I am a novice to JASS and have been reading through and practicing the tutorials found on the site (I have to admit; they're great :thumbs_up:) I've also downloaded a few spell packs to check them out. Then, whenever I try to run the map...disaster strikes, every time.

Ironically, an eerie sense of paronoia comes to me whenever I try to run my map using a few JASS triggers. Wanna know why? Because EVERY time a very minor error in the syntax checker pops up, the map goes to the Warcraft 3 TFT main menu instead of running the map in-game, and yet NO-ONE else seems to have this problem. Of course, the fact that a syntax error is up may make one think I'm stupid, but there is a catch: The JASS systems everyone says works fine does the exact same problem to me every time (reverting to the Warcraft 3 main menu). If it helps, I'm using the Newgen Editor v1.5c.

Some simple, syntax-perfect triggers, such as the host-detection system, work fine on my map, yet all the others that others say are just as good and problem-free always "crash" my game (go to the main menu) because there's always one or more problems with the syntax.

For example, I was busy with this JASS damage detection tutorial, and whenever I tried to run the map it went to the main menu instead, and yet no-one else mentioned a problem with regards to this tutorial (I made sure I copied the JASS script perfectly). Quite frustrating. Can someone please help me with this dilemma?

P.S: I've also tried one of DrSuperGood's spell packs, and the first time I ran it it worked fine! Then, when I opened it up in the Newgen Editor again and tried to play it, it went to the Wacraft III main menu, and I didn't edit his JASS coding. Reinventing the Craft is also disabled in my editor.

+rep to any who provide answers
 
Level 9
Joined
Mar 25, 2005
Messages
252
Only thing I can think of is that you're not saving your map before running it, which is something JNPG requires you to do. Also, if you're using TESH, whenever you change your cursor position in a jass trigger, the map becomes modified so you need to save it after doing that if you wanna run it.
 
Level 7
Joined
Jun 16, 2008
Messages
327
Thank you for your answers - I have to say they're definitely pointing me in the right direction.

@Wizardum: I believe so. I have updated my version of Warcraft (Normal WE and Warcraft both to 1.23) and my NewGen editor to what I assume the newest. (v5c - Here's where I downloaded it from
@Element of Water: Hmmm, you have a point. I am currently using the 1.23 patch version. What should I do about this?
@DiscipleofLife: I'll try that, thank you.
 
Level 7
Joined
Jun 16, 2008
Messages
327
Hmmm, I tried his solution (saving before every test run), but it did not work. However, Element of Water, I believe my problem can be fixed by transforming it into ANOTHER, different problem. That is, changing my version to 1.23b. Do you know where I can download this, please?
 
Level 7
Joined
Jun 16, 2008
Messages
327
I think I just solved it from your answers! What I did was I toggled with the Jasshelper syntax controls in my Newgen and it ran a simple vJass code without any problem!
Here's the code I ran:
JASS:
scope HeroDies // <---------<<

function Trig_HeroDies_Conditions takes nothing returns boolean
    if ( not ( IsUnitType(GetTriggerUnit(), UNIT_TYPE_HERO) == true ) ) then
        return false
    endif
    return true
endfunction

function Trig_HeroDies_Actions takes nothing returns nothing
    call ReviveHeroLoc( GetDyingUnit(), GetRectCenter(GetPlayableMapRect()), true )
endfunction

//===========================================================================
function InitTrig_HeroDies takes nothing returns nothing
    set gg_trg_HeroDies = CreateTrigger(  )
    call TriggerRegisterAnyUnitEventBJ( gg_trg_HeroDies, EVENT_PLAYER_UNIT_DEATH )
    call TriggerAddCondition( gg_trg_HeroDies, Condition( function Trig_HeroDies_Conditions ) )
    call TriggerAddAction( gg_trg_HeroDies, function Trig_HeroDies_Actions )
endfunction

endscope // <---------<<

It never went to the main menu, but instead played the map correctly and the trigger worked!
With this outcome, I'm sure my problem has been solved.
+rep to all who helped me
 
Last edited:
Status
Not open for further replies.
Top