Results 1 to 5 of 5

Thread: elseif with Islocation xD

  1. #1
    iBot User
    Join Date
    Nov 2012
    Posts
    319
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    12 Post(s)
    Reputation
    33
    Rep Power
    5

    Question elseif with Islocation xD

    hello I'm Using this in waypoint.
    PHP Code:
    if islocation(7)
    then gotolabel('tohunt')
    elseif 
    islocation(6)
    then gotolabel('back')
    end 
    I want check If I'm in location 6 or 7 for go to x position but I'm in (6) and the char ton go to label "back" try to reach "hunt" :/

    I'm doing something bad?

    thanks by the way, somebody Know how to do a "select Case" ? :d

  2. #2
    Normal User Xardas's Avatar
    Join Date
    Jun 2012
    Posts
    58
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    17
    Rep Power
    5
    Guessing you want to check if bot is at wpt called 6 or 7, am I right?

  3. #3
    iBot User
    Join Date
    Nov 2012
    Posts
    319
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    12 Post(s)
    Reputation
    33
    Rep Power
    5
    no I mind 6 or 7 like "floor" xD example waypoint. 11111,22222,6 ...

    I use others simple like this and work good
    PHP Code:
    if islocation(6)
    then gotolabel('xxxxxx')
    else 
    gotolabel('yyyyy')
    end 
    and this{ work great but the "else if" is possible?

  4. #4
    Normal User Xardas's Avatar
    Join Date
    Jun 2012
    Posts
    58
    Mentioned
    9 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    3 Post(s)
    Reputation
    17
    Rep Power
    5
    PHP Code:
    if posz == 7 then
       gotolabel
    ('tohunt'
    elseif 
    posz == 6 then
       gotolabel
    ('back'
    end 
    PS. islocation() checks position from place, where you put this action (if you set 7, bot will check position of 7sqm around that place).
    Last edited by Xardas; 02-07-2013 at 09:31 PM.

  5. #5
    iBot User
    Join Date
    Nov 2012
    Posts
    319
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    12 Post(s)
    Reputation
    33
    Rep Power
    5
    :O and why work with ropes ? :O :O :O

    I have lived all my life cheated i will test

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •