Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

PJass updates

Discussion in 'Warcraft Editing Tools' started by LeP, Oct 25, 2014.

  1. LeP

    LeP

    Joined:
    Feb 13, 2008
    Messages:
    479
    Resources:
    0
    Resources:
    0
    As i mentioned i have problems with the newest patch.
    I can't really test what valid jass is; for example if
    return null
    is still bugged or what kind of type-casting is allowed now. That being said, pjass doesn't really need to be adapted to the new patch (modulo the modulo operator) since it always gets passed the common.j and Blizzard.j from somewhere. So the new natives and such should just work, if your World Editor of choice passes the right files.

    That being said, i have a 1.29 branch in my git but i can only modify it based on heresay at the moment. I will attach it but this is pjass for 1.29 ptr so it might no be 100% correct anymore.

    And i just hope that blizzard will release quick patch.
     

    Attached Files:

  2. TriggerHappy

    TriggerHappy

    Code Moderator

    Joined:
    Jun 23, 2007
    Messages:
    3,793
    Resources:
    22
    Spells:
    11
    Tutorials:
    2
    JASS:
    9
    Resources:
    22
    Yeah I think it just needs support for the modulo operator. The
    return null
    bug has been fixed.

    Typecasting no longer works but shadowing still does so you shouldn't need to update much.
     
  3. LeP

    LeP

    Joined:
    Feb 13, 2008
    Messages:
    479
    Resources:
    0
    Resources:
    0
    The return null stuff for example is just a git revert away. The typing rules are a bit more delicate and i would like to test them myself. Otherwise the best way is to send code snippets which either should compile but dont or which shouldnt compile but do. That should atleast be sufficient for the short run.
     
  4. Dracaratos

    Dracaratos

    Joined:
    Mar 20, 2014
    Messages:
    67
    Resources:
    0
    Resources:
    0
    @LeP thank you by the way for your work. You, Vexorian, and everyone else who has created the tools that allow us Map Developers to just learn ZINC/vJASS and just use it is all because of you guys.
     
  5. pyf

    pyf

    Joined:
    Mar 21, 2016
    Messages:
    2,689
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    I therefore understand that this post was unfortunately of no help?
     
  6. LeP

    LeP

    Joined:
    Feb 13, 2008
    Messages:
    479
    Resources:
    0
    Resources:
    0
    unfortunatley not. I ofcourse tried your suggestion and redownloaded directx. and 1.29.1 also didn't fix my problems. maybe wex works around it? i haven't tried it yet. i have reported my issues, now it's up to blizzard to fix them.
     
  7. pyf

    pyf

    Joined:
    Mar 21, 2016
    Messages:
    2,689
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
  8. LeP

    LeP

    Joined:
    Feb 13, 2008
    Messages:
    479
    Resources:
    0
    Resources:
    0
    @Wareditor requested to report the line where a block was opened when the corresponding endblock is missing. Consider this beta though.
    Code (vJASS):

    function f takes nothing returns nothing
        local integer x
        local integer y
        if true then
            set x = 4
            loop
            exitwhen true
          set y = 3
       set y = 8
    endfunction
     

    Code (Text):

    $ pjass test.j
    test.j:11: Missing endloop for block opened in line 7.
    test.j:11: Missing endif for block opened in line 5.
    test.j failed with 2 errors
    Parse failed: 2 errors total
     
     

    Attached Files:

  9. Wareditor

    Wareditor

    Joined:
    Jan 16, 2009
    Messages:
    681
    Resources:
    3
    Maps:
    3
    Resources:
    3
    Thank you for the update! Gonna test it soon :)
    Can you make it so next update has a max recursion limit of 1000000 so I don't have to recompile it each time? If you don't want to do it just for one person, that's okay.

    EDIT: my pjass crash when trying to compile my map. The map has not syntax error as my previous pjass didn't find any mistake and the map compiled fine. Funny enough when I try to compile this same map but this time with a missing endblock error it doesn't crash but report the error like it used to (without actually giving the line of the start of the block). @LeP
     
    Last edited: Jul 24, 2018
  10. LeP

    LeP

    Joined:
    Feb 13, 2008
    Messages:
    479
    Resources:
    0
    Resources:
    0
    eh. i guess i would need the map/war3map.j. or maybe the core dump. or come to irc :)
     
  11. LeP

    LeP

    Joined:
    Feb 13, 2008
    Messages:
    479
    Resources:
    0
    Resources:
    0
    Fixed some really silly bug thanks to @Wareditor. Also enabled some optimisation in cross compiling (my gcc for cross-compiling is rather old... well what can you do)
    Also if more people reach that stack limit error pls say so and i will increase it again.
     

    Attached Files:

  12. LeP

    LeP

    Joined:
    Feb 13, 2008
    Messages:
    479
    Resources:
    0
    Resources:
    0
    Added modulo operator and merged the above release aswell.
     

    Attached Files:

  13. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,429
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    wait. jass supports a modulo operator? o.o

    or does pjass translate it somehow? it looks like it only does type-checking
     
  14. Illidan(Evil)X

    Illidan(Evil)X

    Joined:
    Oct 24, 2004
    Messages:
    647
    Resources:
    150
    Models:
    109
    Icons:
    27
    Skins:
    2
    Maps:
    12
    Resources:
    150
    set i = 1000 % 8
    is valid Jass code since patch 1.29.
     
  15. PurgeandFire

    PurgeandFire

    Code Moderator

    Joined:
    Nov 11, 2006
    Messages:
    7,429
    Resources:
    18
    Icons:
    1
    Spells:
    4
    Tutorials:
    9
    JASS:
    4
    Resources:
    18
    Awesome! I didn't know they added that.
     
  16. Prometheus3375

    Prometheus3375

    Joined:
    Jul 20, 2018
    Messages:
    100
    Resources:
    0
    Resources:
    0
    Well, you forgot to update link in the 1st post.

    And it's still passes next mistake.
    Code (vJASS):
    globals
        boolean B true
    endglobals
     
     
  17. LeP

    LeP

    Joined:
    Feb 13, 2008
    Messages:
    479
    Resources:
    0
    Resources:
    0
    Sorry can't replicate this one:
    Code (Text):

    $ ./pjass -v
    ./pjass version git-ea093b2
    $ cat tests/should-fail/vardecl-missing-equal.j
    globals
        boolean B true
    endglobals
    $ ./pjass tests/should-fail/vardecl-missing-equal.j
    tests/should-fail/vardecl-missing-equal.j:2: syntax error
    tests/should-fail/vardecl-missing-equal.j failed with 1 error
    Parse failed: 1 error total

     
     
  18. Prometheus3375

    Prometheus3375

    Joined:
    Jul 20, 2018
    Messages:
    100
    Resources:
    0
    Resources:
    0
    Hmmm, I created new map and write that piece of code. No mistake was found when I clicked "Save map".
    Used pjass.exe from that post.
     

    Attached Files:

  19. LeP

    LeP

    Joined:
    Feb 13, 2008
    Messages:
    479
    Resources:
    0
    Resources:
    0
    That's on jasshelper. Jasshelper translates
    boolean B true
    to
    boolean B
    .
     
  20. Prometheus3375

    Prometheus3375

    Joined:
    Jul 20, 2018
    Messages:
    100
    Resources:
    0
    Resources:
    0
    I noticed that the latest pjass has problems with encoding.

    [​IMG]

    No such bug with this version. Tested it because I had it on my computer.
    Changing encoding in PowerShell with chcp command does not help.
     

    Attached Files: