• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Expected a name

Status
Not open for further replies.
I downloaded a missile system because my own system clearly won't work at all. After importing it, the program said that it expected a name somewhere in the trigger. I searched it through and found the problem.


  • Untitled Trigger 002
    • Events
    • Conditions
    • Actions
      • Custom script: set udg_MS_tempreal[2] = ParabolaZ(udg_MS_MissileH2[udg_MS_Integer[3]],udg_MS_tempreal[1],udg_MS_distance[udg_MS_Integer[3]])
So I looked each variable carefully through 3 times and I can tell you that I am 100% sure that every variable used in this script does exist. It doesn't give this error in the original map so why doesn't it work in mine?

EDIT: Ok I'll copy and paste the varibles so you can see for yourselfs:

MS_tempreal - array of real
MS_MissileH2 - array of real
MS_Integer - array of integer
MS_distance - array of real.
I deleted the triggers and imported them again. samre results....
 
Last edited:
Level 19
Joined
Aug 8, 2007
Messages
2,765
do you have a library in your header with the function ParabolaZ?

also, is that the line that jasshelper told you about and you put it in that trigger? or is that trigger part of the system?

e/ oh your variables should be

MS tempreal
MS MissileH2

not

MS_tempreal

...

if i remember correctly about how JASS interpets GUI variable constants
 
Level 23
Joined
Apr 16, 2012
Messages
4,041
you cant have space in variable name

also you instantly assume he is using JNGP, in fact, he may very well be in normal editor, where he cant even use vJass stuff with libraries etc.

Is the script Jass or vJass? If it is vJass, you will have to download JNGP and use that if you arent already. If it is Jass, then you can just put it to the map header script(when you click on the map in trigger editor, from which all the GUI triggers and comments and folders and everything go) and it should work OK.

You can distinguish vJass and Jass by looking for these keywords: struct, library, scope, initializer, interface, extends, module, globals, method, method operator, static, //! textmacro, //! import and of course their end counterparts(endglobals etc)
 
Status
Not open for further replies.
Top