• 🏆 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!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] Syntax Error: "Comparing two variables of different primitive types (except real a...

Status
Not open for further replies.

Cokemonkey11

Spell Reviewer
Level 30
Joined
May 9, 2006
Messages
3,550
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