• 🏆 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] Syntax Error: "Comparing two variables of different primitive types (except real a...

Status
Not open for further replies.

Cokemonkey11

Spell Reviewer
Level 29
Joined
May 9, 2006
Messages
3,534
I'm in the process of converting some triggers in a map from GUI to jass and, without changing (much), JNGP returns a syntax error:

"Comparing two variables of different primitive types (except real and integer) is not allowed."

Here's the line:

JASS:
   if ( not ( GetItemTypeId(UnitItemInSlot(GetSpellAbilityUnit(), 1)) != itemUpgAcidCannon[bj_forLoopAIndex] ) ) then

However I understand sometimes syntax checker is incorrect so I'm just curious on what I or perhaps blizzard did wrong here.

Also note that the map can save (compiles) with no problems.

Also don't point out the redundancy in if (not(, I need to work on that still.
 
Level 19
Joined
Aug 24, 2007
Messages
2,888
change itemUpgAcidCannon to Integer

@The_Reborn_Devil: I changed my mind, I do hate you, I hate everyone these days
 
Status
Not open for further replies.
Top