• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

JASSHelper crashes on perfectly compilable code

Status
Not open for further replies.
Level 24
Joined
Aug 1, 2013
Messages
4,657
Hi all.

When creating my String2JASS() function, I came to a very weird problem.
(Dont ask why but yes I want to code during gameplay with chat messages.)
When testing the system, I made a call on the initializer to show my lazyness.
However... when I put that up, I came to this error over and over again.
QDNiTjG.png


After a lot of commenting and removing... I found out that this is breaking down JASSHelper.
However, the code runs exacly how it should run in-game.
JASS:
function f2 takes nothing returns nothing
    call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, "")
endfunction

function f1 takes string text returns nothing
endfunction

function InitTrig_I_AM_ERROR takes nothing returns nothing
    call f1("call f2()")
endfunction

WHY?!?!
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
I tested the same script with vexorians JassHelper. The reason is that since it is one line function, JassHelper will try to inline it, and somehow fuck up and run into infinite loop trying to acquire resources, until it just gives up on you.

Adding a single "return" statement at the end of f2 will solve the problem
 
Status
Not open for further replies.
Top