Signup Now
Results 1 to 9 of 9

Thread: How? For each!!

  1. #1
    Banned
    Join Date
    Dec 2013
    Location
    Porto Alegre - RS
    Posts
    524
    Reputation
    61
    Rep Power
    0

    How? For each!!

    How can i set a "For" condition like a limited turns?

    I need to do the same thing 4 times.

    I only now this

    for i=1.... nothing more .-. haha

    Thanks!

  2. #2
    Moderator RoxZin xD's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    4,914
    Reputation
    109
    Rep Power
    31
    Would be something like
    for i = 1,4 do
    blablabla
    end



    Troubled Animals Quest [100+]
    ALL
    Feyrist Animals Surface [160+]
    RP
    Feyrist Silencers Underground X1 [180+]
    RP | EK
    Feyrist Silencers Underground X2 [200+]
    RP | EK
    Feyrist Silencers Surface [210+]
    RP | EK
    Rathleton Sewers [240+]
    RP
    Glooth Fairy [350+]
    ED/MS
    Hardcore Draken Walls [400+]
    EK

  3. #3
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,441
    Reputation
    309
    Rep Power
    28
    for i = 1, 4 do
    -- do something 4 times
    end

  4. #4
    Moderator RoxZin xD's Avatar
    Join Date
    Dec 2013
    Location
    Rio de Janeiro
    Posts
    4,914
    Reputation
    109
    Rep Power
    31
    I was right OMG !!!!!!!!!11 So proud of myself!



    Troubled Animals Quest [100+]
    ALL
    Feyrist Animals Surface [160+]
    RP
    Feyrist Silencers Underground X1 [180+]
    RP | EK
    Feyrist Silencers Underground X2 [200+]
    RP | EK
    Feyrist Silencers Surface [210+]
    RP | EK
    Rathleton Sewers [240+]
    RP
    Glooth Fairy [350+]
    ED/MS
    Hardcore Draken Walls [400+]
    EK

  5. #5
    Banned
    Join Date
    Dec 2013
    Location
    Porto Alegre - RS
    Posts
    524
    Reputation
    61
    Rep Power
    0
    Quote Originally Posted by Raphael View Post
    for i = 1, 4 do
    -- do something 4 times
    end

    but i need the counter increases



    • for i =1,4do
    • each[+1]
    • end


    to do something like that


    • for i =1,4do
    • say("hi")
    • say("hi2")
    • say("hi3")
    • end



    each time increses the counter,

  6. #6
    Free User eachziN's Avatar
    Join Date
    Dec 2013
    Location
    Terra gentil ao turista
    Posts
    49
    Reputation
    14
    Rep Power
    0
    use the variavel i as your "counter"
    puts for i = 1,4 do
    say("hi" ..i)
    end

    profit :}

  7. #7
    Banned
    Join Date
    Dec 2013
    Location
    Porto Alegre - RS
    Posts
    524
    Reputation
    61
    Rep Power
    0
    error in Persistent script BJGame:
    ["rolled..i = true "]:BJGame:76: '=' expected near '..'


    O código é esse " rolled..i = true "

  8. #8
    Free User Donatello's Avatar
    Join Date
    Dec 2013
    Location
    Tuscany, Italy
    Posts
    398
    Reputation
    51
    Rep Power
    21
    local x = 1

    for i = 1, 4 do
    x = x + i
    end


    I couldn't rly understand ur request, please be more specific.

  9. #9
    Banned
    Join Date
    Dec 2013
    Location
    Porto Alegre - RS
    Posts
    524
    Reputation
    61
    Rep Power
    0
    I need something ling


    for i=1,4 do
    if check..i == false then
    DOTHESCRIPT
    check..i = true
    end

 

 

Posting Permissions

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