What string.sub exactly do?
What string.len do?
What tonumber do?
What loadstring do?
I think loadstring is to load a variable in run-time
=========================
Look this: It's a kick Script
1
2
3
4
5
2
3
4
5
function saykick(id, txt) if(string.sub(txt,1,5)=="!kick") then parse("kick "..(tonumber(string.sub(txt,7,string.len(txt)))).." Kicked!") end end
In this case why it's used?
(txt,1,5)=="!kick")
I don't understand why is: txt,1,5
I think is to return 5 letter form the text
Here too
(txt,7,string.len(txt))
I think is to return 7 letter form the text
Am I correct?
I'm new in lua
And i don't know what these things exactly do.
Help-me
edited 2×, last 13.03.11 03:36:02 pm