Results 1 to 4 of 4

Thread: Problem with IF

  1. #1
    iBot User
    Join Date
    Aug 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5

    Problem with IF

    basicly i want it to check with setup if floor2 is true then gotolabel("floor2start") else gotolabel("floor2end")

    in setup i have this
    -- Floor setup:
    floor2 = false

    and this is what i have in the action in the waypoints

    if floor2
    then gotolabel("floor2start")
    else
    gotolabel("Floor2end")
    end

    so what do i have to put there to make it work
    Last edited by black demon; 11-20-2012 at 04:54 PM.

  2. #2
    Normal User blakw's Avatar
    Join Date
    Mar 2012
    Location
    www.blakw.com
    Posts
    815
    Mentioned
    221 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    345 Post(s)
    Reputation
    462
    Rep Power
    10
    PHP Code:
    if floor2 == true
    then
        gotolabel
    ("floor2start")
    elseif 
    floor2 == false
    then
        gotolabel
    ("Floor2end")
    end 


    ------------------------------------Latest Releases:------------------------------------
    Vocations:
    Darashia Lions Rock
    Oramond Seacrest Serpents X1

    For a better iBot!

    (◣_◢)

  3. #3
    iBot User
    Join Date
    Aug 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    10
    Rep Power
    5
    thx mate it works perfectly, and also thx for moving it to the right section :P

  4. #4
    Banned
    Join Date
    May 2012
    Posts
    680
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    24
    Rep Power
    0
    quite odd that you acctually have to compare it to true/false, as a boolean value it would mean "if true/false then" acctually.

    Not sure if that's LUA or ibots interpretation of Lua.

Posting Permissions

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