1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

[JASS] "Error on Compare Variable on different primatives"

Discussion in 'Triggers & Scripts' started by ALTELMA, May 14, 2012.

  1. ALTELMA

    ALTELMA

    Joined:
    Jan 4, 2009
    Messages:
    113
    Resources:
    0
    Resources:
    0
    Code (vJASS):

    function Trig_Check_Integer_Actions takes nothing returns nothing
        local integer Int_Kill = 0
       
        set udg_ScoreKills[Int_Kill] = udg_ScoreKills[Int_Kill] + 1
        call BJDebugMsg("CHAT : "+I2S(udg_ScoreKills[Int_Kill]))
        if(udg_ScoreKills[Int_Kill] == 3)then
            call BJDebugMsg("CHAT COMPLETE")
        endif
    endfunction

    //===========================================================================
    function InitTrig_Check_Integer takes nothing returns nothing
        local trigger t = CreateTrigger()
        call TriggerRegisterPlayerChatEvent( t, Player(0), "", false )
        call TriggerAddAction( t, function Trig_Check_Integer_Actions )
        set t = null
    endfunction
     


    It's code upper. It's display error "Comparing two variables of different primatives types (except real and integer) is not allow",but the map can still run and save.

    In this case is normally same when I uses global variable?
     
  2. Spartipilo

    Spartipilo

    Joined:
    Jul 14, 2011
    Messages:
    3,190
    Resources:
    0
    Resources:
    0
    Are you sure the problem is in this trigger?

    udg_ScoreKills is a REAL or an INTEGER variable?

    I can't see anything wrong with this.
     
  3. ALTELMA

    ALTELMA

    Joined:
    Jan 4, 2009
    Messages:
    113
    Resources:
    0
    Resources:
    0
    This error is display when I click checkSyntax Button, but It's don't error on save map and run map normaly.
     
  4. Troll-Brain

    Troll-Brain

    Joined:
    Apr 27, 2008
    Messages:
    2,372
    Resources:
    1
    JASS:
    1
    Resources:
    1
    Just don't use the syntax check button.
    In fact it should be removed of the JNGP.
     
  5. Adiktuz

    Adiktuz

    Joined:
    Oct 16, 2008
    Messages:
    9,674
    Resources:
    23
    Models:
    2
    Packs:
    1
    Maps:
    1
    Spells:
    16
    Tutorials:
    1
    JASS:
    2
    Resources:
    23
    so you posted two threads about this... sigh... XD...

    I think I already told you not to use SC button on the other thread...
     
  6. ALTELMA

    ALTELMA

    Joined:
    Jan 4, 2009
    Messages:
    113
    Resources:
    0
    Resources:
    0
    Sorry very much. Notice to delete this thread.