Syntax error?

krainert

Member
Reaction score
10
vJass:

JASS:
library OptionalCode //simplified from example at <a href="http://www.wc3c.net/vexorian/jasshelpermanual.html" target="_blank" class="link link--external" rel="nofollow ugc noopener">http://www.wc3c.net/vexorian/jasshelpermanual.html</a>
    globals
        constant boolean DO_KILL_LIB = true
    endglobals
    function fun takes nothing returns nothing
        static if DO_KILL_LIB then //*
            call BJDebugMsg(&quot;DO_KILL_LIB is true&quot;)
        endif
    endfunction
endlibrary


Syntax error at the asterisk (*). What am I missing?
 
im not experienced with static ifs, but wouldnt it work the same if you just used an [ljass]if DO_KILL_LIB then[/ljass]?
 
GFreak45 please stop answering if you don't know the answer O_O

Yes it would work if the [ljass]if[/ljass] weren't [ljass]static[/ljass], but obviously kraniert needs a it for something else

Btw i copy pasted it into my map and compiles, are you running on the latest JassHelper version?
 
It probably somehow reads it as a comment block
JASS:

/*
this is also a comment I think somehow jasshelper misses that the &quot;*&quot; is commented and tries to find a comment block end but as there is none it gives an error
just put this: &quot;*./&quot; at the end try if it works (remove the dot).
*/
 
You can't nest comments, and JH think you're doing that. Get rid of the (*), try to add another (/) or try to close it with (*/). Some of these might work.

Or try to update your JH to 0.A.2.B., because Dirac said it works with his JH.
 
GFreak45 please stop answering if you don't know the answer O_O
Chill, dude :)

im not experienced with static ifs, but wouldnt it work the same if you just used an [ljass]if DO_KILL_LIB then[/ljass]?
http://www.wc3c.net/vexorian/jasshelpermanual.html said:
static ifs are like normal ifs, except that a) the condition must contain only constant booleans, the and operator and the not operator and b) They are evaluated during compile time. Which means that the code that is not matched to its condition is simply ignored.

Btw i copy pasted it into my map and compiles, are you running on the latest JassHelper version?
Figures. I'll try it on this (another) pc.

It probably somehow reads it as a comment block
JASS:
/*
this is also a comment I think somehow jasshelper misses that the &quot;*&quot; is commented and tries to find a comment block end but as there is none it gives an error
just put this: &quot;*./&quot; at the end try if it works (remove the dot).
*/
I'm not entirely sure I follow, but I'll look at it.

Thanks.
 
Okay, it works on my desktop pc which explains why I did not encounter any errors the last time I tested the map.

NewGen WE has occasionally been crashing on launch on my laptop, on which the syntax error issue occurred, and now it seems I run into this problem on every single launch for some reason.
Any ideas? It's a brand new Win7 x64 Pro installation, and I just downloaded the Jass NewGen Pack anew just to be safe. No success so far.
 
GFreak45 please stop answering if you don't know the answer O_O

im trying to learn, is there anything wrong with that?
my questions just come up in other threads
thats how i learned gui, data editing in sc2 and plenty of other things
so if you dont like it, thats great for you, but dont tell me because i honestly dont care
 
But I figure its editor should still be able to launch at least... Anyway, how do you recommend I acquire a contemporary WE distro with JassHelper?
 
@luorax
JASS:
//* this doesn&#039;t cause JH to think you&#039;re trying to nest comments since that makes no sense at all
/* /* /* neither does this */
//////// or this

@dudeim
Wrong, the double slash means that everything in that line is a comment therefore the (*) is ignored
@GFreak45
Thats one sweet way to hijack threads then, if you have any questions bring them up yourself in a new thread
 
@luorax
JASS:
//* this doesn&#039;t cause JH to think you&#039;re trying to nest comments since that makes no sense at all
/* /* /* neither does this */
//////// or this

@dudeim
Wrong, the double slash means that everything in that line is a comment therefore the (*) is ignored
@GFreak45
Thats one sweet way to hijack threads then, if you have any questions bring them up yourself in a new thread

I know it shouldn't be counted but who knows maybe some bug in JH or an outdated version bugs with it you never know;)
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Ghan Ghan:
    See how we like that.
  • The Helper The Helper:
    I do not see a way to go past the 1st page of posts on the forum though
  • The Helper The Helper:
    It is OK though for the main page to open up on the forum in the view it was before. As long as the portal has its own URL so it can be viewed that way I do want to try it as a regular forum view for a while
  • Ghan Ghan:
    Yeah I'm not sure what the deal is with the pagination.
  • Ghan Ghan:
    It SHOULD be there so I think it might just be an artifact of having an older style.
  • Ghan Ghan:
    I switched it to a "Standard" article forum. This will show the thread list like normal, but the threads themselves will have the first post set up above the rest of the "comments"
  • The Helper The Helper:
    I don't really get that article forum but I think it is because I have never really seen it used on a multi post thread
  • Ghan Ghan:
    RpNation makes more use of it right now as an example: https://www.rpnation.com/news/
  • The Helper The Helper:
  • The Helper The Helper:
    What do you think Tom?
  • tom_mai78101 tom_mai78101:
    I will have to get used to this.
  • tom_mai78101 tom_mai78101:
    The latest news feed looks good
  • The Helper The Helper:
    I would like to see it again like Ghan had it the first time with pagination though - without the pagination that view will not work but with pagination it just might...
  • The Helper The Helper:
    This drink recipe I have had more than a few times back in the day! Mind Eraser https://www.thehelper.net/threads/cocktail-mind-eraser.194720/
  • The Helper The Helper:
    Happy Thursday!
  • Ghan Ghan:
    I'm not so sure, there's still a lot of Thursday left for it to become unhappy.
    +3
  • The Helper The Helper:
    still a few hours
  • The Helper The Helper:
    Its Friday!!!!
    +1
  • Ghan Ghan:
    Thursday 7/10 would Thursday again
    +3
  • The Helper The Helper:
    New forum coming soon going to be for my friend Saylor who is blind and he is doing motivational speaking and has an internet radio show and podcast. I am going to put a forum to promote him and other inspirational speaker stuff going to have some good stuff in it.
  • The Helper The Helper:
    his audio only music mix
  • The Helper The Helper:
    it just makes sense right?

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top