Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

GetIssuedOrderID

Discussion in 'World Editor Help Zone' started by aple, Oct 24, 2017.

  1. aple

    aple

    Joined:
    May 20, 2009
    Messages:
    811
    Resources:
    2
    Maps:
    1
    Tutorials:
    1
    Resources:
    2
    Does GetIssuedOrderID provide the integer ID or the string ID? If it's the string, what can I use to get the integer ID?

    If it already is the Integer ID, then what am I doing wrong here? It's telling me "Invalid type for specified operator"

    Code (vJASS):
    if GetIssuedOrderId() != udg_U_Build_BuildingOrder[udg_U_Build_Index[12]] then


    U_Build_BuildingOrder is an Integer variable, because it's the only way I can get the Order ID of the "abilities" I'm looking for (They only have Integer IDs, no String IDs) which are the individual build building abilities in the Build Building menus.

    EDIT: I actually totally forgot that U_Build_BuildingOrder is not an integer, it is a string. Because the Order ID integer was too long to be put into the GUI for it. But now I have another problem. When I try to do,

    Code (vJASS):

    Custom script:   if orderid != S2I(udg_U_Build_BuildingOrder[udg_U_Build_Index[12]])
     


    The Editor crashes. Completely. Just completely crashes. It does this with I2S as well.
     
    Last edited: Oct 24, 2017
  2. ZiBitheWand3r3r

    ZiBitheWand3r3r

    Joined:
    Nov 21, 2012
    Messages:
    914
    Resources:
    15
    Maps:
    7
    Spells:
    8
    Resources:
    15
    GetIssuedOrderId()
    is an integer
    build order is a 10 digit integer, you can compare it like this:
    if GetIssuedOrderId() == 'h000' then

    if you really need a string, it is in format "custom_h000" where h000 is your building id
     
  3. aple

    aple

    Joined:
    May 20, 2009
    Messages:
    811
    Resources:
    2
    Maps:
    1
    Tutorials:
    1
    Resources:
    2
    It had to be a string because I could not put the entire integer ID into an integer variable. For example, the vanilla Town Hall is 1752461175. You can't put that many digits into an Integer variable, though. Or at least not through GUI.
     
  4. ZiBitheWand3r3r

    ZiBitheWand3r3r

    Joined:
    Nov 21, 2012
    Messages:
    914
    Resources:
    15
    Maps:
    7
    Spells:
    8
    Resources:
    15
    Better work with integers, don't convert to the strings.
    use custom script:
    • Custom script: set udg_yourIntegerVariable = 'h000'
     
  5. aple

    aple

    Joined:
    May 20, 2009
    Messages:
    811
    Resources:
    2
    Maps:
    1
    Tutorials:
    1
    Resources:
    2
    What are you talking about? "h000" is not an integer, you can't put that in an Integer variable Lol.
     
  6. Tasyen

    Tasyen

    Joined:
    Jul 18, 2010
    Messages:
    1,692
    Resources:
    37
    Tools:
    2
    Maps:
    3
    Spells:
    11
    Tutorials:
    20
    JASS:
    1
    Resources:
    37
    he wrote 'h000' not "h000", that is a big difference in jass/Warcraft.

    'h000' is a number (integer) using the Warcraft Id-System.
    "h000" is a string with the value h000.