HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

NewGen Pack v2 compiling weird

04-11-2007, 03:48 PM#1
Mezzer
Yeah, I decided to give this a try since it'd help with a bunch of stuff really, and first time out I run into a compiler error which doesn't make sense. So I figured I must be doing something wrong and tried compiling the code used in the original example; same error.
Here's Vex's example code which results in a "type iar_ar does not support . syntax" error.
Collapse JASS:
type iar extends integer array[3]
type iar_ar extends iar array[3]

function test takes nothing returns arsample
 local iar_ar r=iar_ar.create()  //It refers to this line
 local integer i=0
 local integer j
     loop
         exitwhen i==iar_ar.size
         set r[i]=iar.create() //Or this one if the former is removed
         set j=0
         loop
             exitwhen j==iar.size  //And here as well
             set r[i][j]=j*i
             set j=j+1
         endloop

         set i=i+1
     endloop
 return r
endfunction

Anyone know why?
04-11-2007, 04:22 PM#2
wantok
Are you using the latest version of JassHelper. It compiles fine in 0.9.8.2, except for this line:
Collapse JASS:
function test takes nothing returns arsample
change that to:
Collapse JASS:
function test takes nothing returns integer
//or
function test takes nothing returns iar_ar
04-11-2007, 04:44 PM#3
Captain Griffen
Error messages often appear on the line below.
04-11-2007, 04:52 PM#4
Mezzer
That isn't the issue, since I tried this with some different code and it does the same thing:
iar_ar is not of a type that allows . sytax

Like I said, changing that didn't help.

Quote:
Originally Posted by Captain Griffen
Error messages often appear on the line below.
Too often, but not here sadly.

Edit:
Ah found the reason; I figured that it was the latest version in the NewGen pack, but apparently it isn't, so had to update that, and it fixed it. Well, now I feel dumb.
04-11-2007, 05:07 PM#5
Vexorian
NewGen is going to be updated today unless I got delays caused by real life
04-11-2007, 05:15 PM#6
emjlr3
Quote:
Originally Posted by Vexorian
NewGen is going to be updated today unless I got delays caused by real life

woohoo!!!
04-11-2007, 05:46 PM#7
Mezzer
Just one, more or less, unrelated question; After you create a map using all the new stuff, does anyone who wants to play it need to have anything besides the regular TFT installation? And if not, ha?
04-11-2007, 05:57 PM#8
wantok
All they need is normal TFT. They'd only need the other tools if they opened the map in WE and tried to save it afterwards. JassHelper compiles the script into something warcraft can understand. Check out a map's .j file after its been compiled and you'll see.
04-11-2007, 05:59 PM#9
Captain Griffen
Quote:
Originally Posted by Mezzer
Just one, more or less, unrelated question; After you create a map using all the new stuff, does anyone who wants to play it need to have anything besides the regular TFT installation? And if not, ha?

Unless you use custom natives, no. vJASS doesn't use custom natives.
04-11-2007, 06:03 PM#10
Mezzer
Thanks for the answers, that clears up that confusion.