Zezombye / overpy

High-level language for the Overwatch Workshop with support for compilation and decompilation.
GNU General Public License v3.0
179 stars 27 forks source link

Error: Function 'hudHeader' takes 6 or 7 arguments, received 11 #164

Closed SweetInk closed 4 years ago

SweetInk commented 4 years ago

Opy code

rule "test":
    @Event eachPlayer
    hudHeader(getAllPlayers(), iconString(Icon.WARNING), "ATTETION!", "Hello world", HudPosition.LEFT, 501, Color.RED, Color.RED, Color.ORANGE, HudReeval.VISIBILITY_SORT_ORDER_AND_STRING, SpecVisibility.DEFAULT)

Error StackTrace

Error: Function 'hudHeader' takes 6 or 7 arguments, received 11
    | line 3, col 189, at <main>
    at error (logging.js:44)
    at parseAst (astParser.js:239)
    at parseAst (astParser.js:304)
    at parseAstRules (astParser.js:130)
    at compile (compiler.js:49)
    at demoCompile (demo:185)
    at HTMLButtonElement.onclick (demo:70)

This bug exists in version 5.4.0. In the latest client of OverWatch, there are 11 parameters for "CREATE HUD TEXT" in the workshop.

Zezombye commented 4 years ago

Seems to be another decompiler bug :/ it should be hudText.

Zezombye commented 4 years ago

Fixed in 5.4.2