• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[vJASS] best way to handle rects?

Status
Not open for further replies.
Level 3
Joined
Jan 7, 2010
Messages
37
So, I'm trying to put lots of rects in an array, using http://www.hiveworkshop.com/forums/1867354-post360.html
but can't get it to work.

JASS:
scope RectInit initializer Init
    globals
        private rect array Rects
        public region PlayableArea
    endglobals
    
    private function Init takes nothing returns nothing
    local integer i
        set PlayableArea = CreateRegion()
        ///! runtextmacro SetRectData( "gg_rct_Reg0" , "Rects" )
        loop
            exitwhen i > RectData_RECTNUM
            //...
            set i = i + 1
        endloop
    endfunction
endscope

when I remove the slash from
JASS:
//! runtextmacro SetRectData( "gg_rct_Reg0" , "Rects" )
I can't compile.
I also tried
JASS:
//! runtextmacro SetRectData( gg_rct_Reg0 , Rects )
and other stuff. What am I doing wrong?
 
Level 3
Joined
Jan 7, 2010
Messages
37
I don't get a specific error :/ Jasshelp just stops the progressbar, saying "found error" (then I have to quit the Jasshelper via End Task). so I can't say what the error is, only figure out where by trial and error
 
Take out that part (so that it compiles) and write this anywhere in the script:
JASS:
globals
    a b
endglobals
Do you get an error or does it just freeze? I have seen 2-3 other people have this issue, and it might not necessarily be an issue with the code. It is likely an issue with jasshelper itself. I haven't seen a solution to it, though, sadly.

As for the error, what is the name of the region? In your case, it should be Reg0. Could you attach the map if possible?
 
Level 3
Joined
Jan 7, 2010
Messages
37
"JASSHelper
Found errors, please wait..."
The progress bar stays at zero. I have to end the task
 
Hmm. I'm sorry, no one has come up with a stable solution for this so you may have to be a bit patient (I'll probably end up asking a load of questions). If you can send me the map (through PM), maybe I can at least get the rect array part to compile so you can work on your map meanwhile we sort out the issue.

As for JNGP, could you specify a few things?
  • What operating system do you use? (Windows XP, Windows Vista, Windows 7, Windows 8, etc.)
  • 32-bit or 64-bit?
  • What is the path of your JNGP installation? (e.g. C:/Program Files/Warcraft III/jassnewgenpack5d)
  • Try right clicking JNGP, and select "Run as administrator". Open any map, make an error in the script, and then see if it still has the same issue.

P.S. Sorry for the late reply, I stopped to eat.
 
Level 3
Joined
Jan 7, 2010
Messages
37
Don't know how to send a map through PM ~.~ I have it attached here...

I'm using Windows 7, 64 bit
JNGP path is D:\Warcraft III\jassnewgenpack5d
Running as administrator didn't help.
 
Last edited by a moderator:
Thanks, I fixed it so that it would compile and I sent it right back. (then I removed it from your post, just in case)

Now, about the errors. This is one way to cope with it:
http://www.wc3c.net/showthread.php?p=1134868#post1134868

You just CTRL+Alt+Delete and end the jasshelper process, then you show previous errors, it should show the errors. For now, you should use that.

I'll try to think of something that might help in the meantime.
 
Level 3
Joined
Jan 7, 2010
Messages
37
thanks for your help!
with your made it compiled, but didn't work. I figured out with "show error" that the local integer "i" was already used through the textmacro in RectSystem and caused the trouble. Now it's working just fine!
 
Status
Not open for further replies.
Top