• 🏆 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!

Test map bug (JNGP)

Status
Not open for further replies.
Level 5
Joined
Oct 15, 2009
Messages
136
Ok people, my problem is that when I try, for example, test this system (http://world-editor-tutorials.thehelper.net/maps.php?view=886) the grey pjass.exe syntax checker pops up telling me that there's a 100 compile errors. However, the JNGP intallation process is well done, because I try putting just a simple code, so I can be sure that there's no problem with the installation.

Something else caught my attention. I was following the vJass tutorials made by Nestharus, and the thing is, that I was trying to resolve a problem he posted on his tutorial, and I did it ok until the problem said that I needed to copy and paste this code:

JASS:
scope Display initializer init
    private function Print takes integer value returns nothing
        call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 90000, I2S(value))
    endfunction

    private function init takes nothing returns nothing
        call Set()
        call Print(sets)
    endfunction
endscope

What called my attention was that when I put the scope part on the code, I try to test the map and the syntax checker told me that there were x number of compile errors.

I don't know if anyone had been gone through this, but I so hope that this is a common bug which I am not awared of.

My JNGP configuration is ok, Nestharus try to help me on this bug, he made me follow some instructions so that he can know that my configuration is ok.

The code is fully working, Nestharus tested the map, and he hasn't been poped up by the syntax checker.

By the way, this is the solution to one of Nestharus' problems:

JASS:
globals
    integer add1 = 7
    integer add2 = 9
    integer sets
    integer goo = 16
endglobals

function Add takes integer z, integer z5 returns integer
    return z+z5+add1+add2
endfunction

function Set takes nothing returns nothing
    set sets = Add(goo, 4)
endfunction

scope Display initializer init
    private function Print takes integer value returns nothing
        call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 90000, I2S(value))
    endfunction

    private function init takes nothing returns nothing
        call Set()
        call Print(sets)
    endfunction
endscope

I hope you can help me.

----------EDIT----------

I just discovered that even when I just make this simple code:

JASS:
scope Hi
endscope

The syntax checker gives me with the same list of errors that the code above (a few more less, of course).

Line 1: Syntax error
Line 1: Statement outside of function
Line 1: Statement outside of function
Line 1: Statement outside of function
Line 2: Statement outside of function
Line 2: Statement outside of function


I hope that this new info helps for my issue.
 
Last edited:
Level 5
Joined
Oct 15, 2009
Messages
136
the problem is the scope, but I said the code works fine for other, but not for me.


PROBLEM SOLVE PEOPLE.
 
Last edited:
Status
Not open for further replies.
Top