Jump to content

Recommended Posts

Posted

Heja! Słuchajcie! Mam przykładowo login gracza "themisiakprostadsg" i chcę, aby zwrócono mi wszystkie litery tego nicku i sprintować to na chacie. Problem w tym, że nie wiem czego użyć, aby pobrać każdą jedną literę z tego stringa. Pętle znam, problem w tym jak użyć czegoś w przedrostkiem string.! Proszę o pomoc.

Posted
local login = "themisiakprostadsg" 
for i=1, #login do 
  local toprint = login:sub(i,i) 
  print(toprint) 
end 

tutaj można przetestować:

http://www.lua.org/cgi-bin/demo

Jeśli działa jak potrzeba zo zamieniasz print() na outputChatBox() i gotowe :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...