• 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.

[JASS] Global decleration problem

Status
Not open for further replies.
Level 10
Joined
Aug 19, 2008
Messages
491
Can anyone give me a valid reason why these lines would give me a syntax error?

JASS:
scope CHANGENAME initializer Initialize
//...
    globals
        private group targets
        private boolexpr allowed
        private integer Owner_Id
        private timer Timer
    endglobals
//...
endscope

Line 268: Syntax Error: group CHANGENAME__targets
Line 269: Syntax Error: boolexpr CHANGENAME__allowed
Line 270: Syntax Error: integer CHANGENAME__Owner_Id
Line 271: Syntax Error: timer CHANGENAME__Timer


Worked earlier today perfectly :hohum:
Yes, I'm serious. Here's a picture:
namnlös.JPG
(Just realized that pictures won't prove it since I can still highlight anything in the syntax checker. All I can give you is my word)
 
Last edited:
Level 8
Joined
Aug 6, 2008
Messages
451
TESH syntax checker is kinda useless, since it does not regonize any of this vJass stuff.

Just save your map to see if there is any errors. JassHelper will report them in that case.
 
Level 8
Joined
Aug 6, 2008
Messages
451
Oh, sorry. Should have checked that screenshot.


You sure that dont have disable vJass syntax checked?
 
Level 10
Joined
Aug 19, 2008
Messages
491
TESH is part of JNGP.
Yes I know, but I don't use their syntax checker
Oh, sorry. Should have checked that screenshot.


You sure that dont have disable vJass syntax checked?
Well, it does convert the private globals into ScopeName+__+VariableName, right?
So... I guess not :bored:

Damnit I think I gotta re-install JNPG and try again.
Anyway this is a really wierd bug
 
Level 10
Joined
Aug 19, 2008
Messages
491
Sorry.

Could you post the stuff below the syntax errors? I've had bugs where the line of the error is not related to the error...

Yes I can
JASS:
        constant real CHANGENAME___INCREASE_PER_INTERVAL = 10.
        constant real CHANGENAME___DECREASE_PER_INTERVAL = 10.
        constant real CHANGENAME___INTERVAL              = .20
        constant real CHANGENAME___MAX_AREA              = 1000.
        constant real CHANGENAME___MIN_AREA              = 300.
        constant real CHANGENAME___INITIAL_AREA          = 500.
        constant effect CHANGENAME___EXPLOSION           = 
        group CHANGENAME__targets
        boolexpr CHANGENAME__allowed
        integer CHANGENAME__Owner_Id
        timer CHANGENAME__Timer
// processed:         unit array CHANGENAME__User[7]
// processed:         real array CHANGENAME__SpellX[7]
// processed:         real array CHANGENAME__SpellY[7]
// processed:         real array CHANGENAME__Area[7]
// processed:         boolean array CHANGENAME__HasReachedMaxCap[7]

trigger l__library_init

//JASSHelper struct globals:
integer array s__TimerUtils__data
integer array s__2TimerUtils__data
integer array s__3TimerUtils__data
integer array s__4TimerUtils__data
integer array s__5TimerUtils__data
integer array s__6TimerUtils__data
integer array s__7TimerUtils__data
//etc...
 
Level 10
Joined
Aug 19, 2008
Messages
491
Could it be?:
JASS:
        constant effect CHANGENAME___EXPLOSION           =

It is = ( nothing here )

Yup, that's it. Epic mistake :xxd:
+Rep to you and Eleandor.

if you want it to be nothing remove the =, I believe that will fix it.
No, that will just cause another syntax error, constants have to be initialized.

But a constant effect is kinda useless, imo.
Constant variables are faster than regular variables and will never change, and since mine doesn't ever change in the map I decided to make it constant (to make it faster and avoid stupid bugs which changes it)
If you'd like one single global variable like "Temp_Effect" you're absolutely right, they shouldn't be constant. But in mattes like this - when they don't change ever - always use constants.
 

LeP

LeP

Level 13
Joined
Feb 13, 2008
Messages
543
Well, i never used any constant effect so i wrote imo (in my opinion).
I never use something like that because for effects on units i can use sphere and for effect that are shown the whole i time i use doodads or units.
 
Status
Not open for further replies.
Top