Results 1 to 8 of 8

Thread: And what's wrong with this?

  1. #1
    Normal User catok's Avatar
    Join Date
    Jan 2013
    Location
    Sweden
    Posts
    94
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    14
    Rep Power
    4

    And what's wrong with this?

    PHP Code:
    if posz == and if not hasted and cancast("utani hur"then
        cast
    ("utani hur")
    end
    elseif posz == and if not hasted and cancast("utani hur"then
        cast
    ("utani hur")
    end
    elseif posz == 10 and if not hasted and cancast("utani hur"then
        cast
    ("utani hur")
    end 
    Really? I was sure it was going to work.
    It's for my Port hope corym script. The last piece...
    Why?
    Hard Working Scripter



    My Free Scripts:

    Knight
    EK - Mutated Mountains 50+ (option to hunt any tower)

  2. #2
    Normal User RafiXWPT's Avatar
    Join Date
    Jun 2012
    Location
    (Poland) http://rafixwptscripts.com
    Posts
    1,602
    Mentioned
    31 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    128 Post(s)
    Reputation
    128
    Rep Power
    9
    PHP Code:
    if (posz == or posz == or posz == 10) and not hasted and cancast("utani hur"then 
        cast
    ("utani hur"
    end 

  3. #3
    Normal User catok's Avatar
    Join Date
    Jan 2013
    Location
    Sweden
    Posts
    94
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    14
    Rep Power
    4
    Quote Originally Posted by RafiXWPT View Post
    PHP Code:
    if (posz == or posz == or posz == 10) and not hasted and cancast("utani hur"then 
        cast
    ("utani hur"
    end 
    Yeah..... I did exactly that but like this
    PHP Code:
    if posz == and not hasted and cancast("utani hur"then 
        cast
    ("utani hur"
    end 
    elseif posz == and not hasted and cancast("utani hur"then 
        cast
    ("utani hur"
    end 
    elseif posz == 10 and not hasted and cancast("utani hur"then 
        cast
    ("utani hur"
    end 
    This should work too but it didn't, thanks for your help anyway, it was a stupid mistake.
    Hard Working Scripter



    My Free Scripts:

    Knight
    EK - Mutated Mountains 50+ (option to hunt any tower)

  4. #4
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    Quote Originally Posted by catok View Post
    Yeah..... I did exactly that but like this
    PHP Code:
    if posz == and not hasted and cancast("utani hur"then 
        cast
    ("utani hur"
    end 
    elseif posz == and not hasted and cancast("utani hur"then 
        cast
    ("utani hur"
    end 
    elseif posz == 10 and not hasted and cancast("utani hur"then 
        cast
    ("utani hur"
    end 
    This should work too but it didn't, thanks for your help anyway, it was a stupid mistake.
    no it shouldnt, because you have "end" on line 3 6 and 9. you need to remove it from line 3 and 6, you only use 1 end for each "if", Example:

    PHP Code:
    if posz == and not hasted and cancast("utani hur"then 
        cast
    ("utani hur"
    elseif 
    posz == and not hasted and cancast("utani hur"then 
        cast
    ("utani hur"
    elseif 
    posz == 10 and not hasted and cancast("utani hur"then 
        cast
    ("utani hur"
    end 
    Otherwise it would need to be like this:

    PHP Code:
    if posz == and not hasted and cancast("utani hur"then 
        cast
    ("utani hur"
    end 
    if posz == and not hasted and cancast("utani hur"then 
        cast
    ("utani hur"
    end 
    if posz == 10 and not hasted and cancast("utani hur"then 
        cast
    ("utani hur"
    end 

    However, it is much easier to just say:

    PHP Code:
    if posz == or posz == or posz == 10 and not hasted then "do this" end 
    Hope that clears things up

  5. #5
    Normal User catok's Avatar
    Join Date
    Jan 2013
    Location
    Sweden
    Posts
    94
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    14
    Rep Power
    4
    Well thank you pink_panther for your time explaining this, now I know that "elseif" doesn't require "end", which I thought it needed.
    ^^
    Hard Working Scripter



    My Free Scripts:

    Knight
    EK - Mutated Mountains 50+ (option to hunt any tower)

  6. #6
    iBot User pink_panther's Avatar
    Join Date
    May 2012
    Location
    Australia
    Posts
    4,075
    Mentioned
    49 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    178 Post(s)
    Reputation
    309
    Rep Power
    10
    You're welcome.

    I'm happy to help those who actually want to learn.

    A lot of people just think I'm an arsehole because I provide blunt answers when noobs ask stupid questions.

    :3

  7. #7
    iBot User Dehan's Avatar
    Join Date
    May 2012
    Location
    www.ssocialscripts.com
    Posts
    910
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Quoted
    0 Post(s)
    Reputation
    114
    Rep Power
    7
    Quote Originally Posted by pink_panther View Post
    You're welcome.

    I'm happy to help those who actually want to learn.

    A lot of people just think I'm an arsehole because I provide blunt answers when noobs ask stupid questions.

    :3
    that is true, sometimes I just laugh at them
    hahahahahha
    Check out - Dehan Accounts Service!

    Proud Scripter of BUgWT STAFF

  8. #8
    Normal User Onehit's Avatar
    Join Date
    Mar 2012
    Location
    Cwb
    Posts
    693
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    1 Post(s)
    Reputation
    117
    Rep Power
    7
    Quote Originally Posted by pink_panther View Post
    You're welcome.

    I'm happy to help those who actually want to learn.

    A lot of people just think I'm an arsehole because I provide blunt answers when noobs ask stupid questions.

    :3
    Yeah, but u are right... People ask questions just because they are too lazy.

    NÃO RESPONDO DUVIDAS POR PM
    Brasil, aqui você é o palhaço.

Posting Permissions

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