vJass structs don't work

Ashlebede

New Member
Reaction score
43
I've been trying to use vJass structs for a while now, and ever time I declare a struct, I get this error:
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

Code:
JASS:

struct newstruct
endstruct



Obviously, I tried making it inside a function. result:

Line 2: syntax error

Code:
JASS:

function newfunc takes nothing returns nothing
    struct newstruct
    endstruct
endfunction


And I get the same errors with libraries as well

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

And my code was:
JASS:

library L
endlibrary


I have really no idea what's wrong. My other vJass functions seem to work well...:confused:
 

Magentix

if (OP.statement == false) postCount++;
Reaction score
107
Make sure you have the latest JassHelper in your NewGen pack (v5d!)
 

Komaqtion

You can change this now in User CP.
Reaction score
469
How many JASS triggers do you have in your map ? :eek:
This could be that you've forgotten an "[ljass]endfunction[/ljass]" in another trigger...

Try looking through them ;)
 

Ashlebede

New Member
Reaction score
43
@Magentix :

I have v5d, and my Warcraft is version 1.21b. My installation seems to be correct, since my other vJass functions work just fine...

@Komaqtion :

I made a new map, didn't add anything to it, made only one trigger and inserted that code.:banghead:
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top