Posted 16 October 2012 - 10:50 AM
Hey…
i have made this code, but it dosent work out that i suspect it to…. why?
i want a print, that prints random words (from another function) and then print it… but it says:
startup:113: attempt to concentate nil and string
i have made this code, but it dosent work out that i suspect it to…. why?
Spoiler
function MathText() --- this is the random words.... i want it only to show one of theese words,
every time the function would be called...
loopRTexT = true
while loopRTexT do
RaDM = math.random(100,130)
if RaDM == "100" then
TextDel = " C:\System32x\data135 "
end
if RaDM == "101" then
TextDel = " C:\System32x\data134 "
end
if RaDM == "102" then
TextDel = " C:\System32x\data133 "
end
if RaDM == "103" then
TextDel = " C:\System32x\data132 "
end
if RaDM == "104" then
TextDel = " C:\System32x\data131 "
end
if RaDM == "105" then
TextDel = " C:\System32x\data130 "
end
if RaDM == "106" then
TextDel = " C:\System32x\data129 "
end
if RaDM == "107" then
TextDel = " C:\System32x\data128 "
end
if RaDM == "108" then
TextDel = " C:\System32x\data127 "
end
if RaDM == "109" then
TextDel = " C:\System32x\data126 "
end
if RaDM == "110" then
TextDel = " C:\System32x\data125 "
end
if RaDM == "111" then
TextDel = " C:\System32x\data124 "
end
if RaDM == "112" then
TextDel = " C:\System32x\data123 "
end
if RaDM == "113" then
TextDel = " C:\System32x\data122 "
end
if RaDM == "114" then
TextDel = " C:\System32x\data121 "
end
if RaDM == "115" then
TextDel = " C:\System32x\data213 "
end
if RaDM == "116" then
TextDel = " C:\System32x\data123 "
end
if RaDM == "117" then
TextDel = " C:\System32x\data213 "
end
if RaDM == "118" then
TextDel = " C:\System32x\data2213 "
end
if RaDM == "119" then
TextDel = " C:\System32x\data29 "
end
if RaDM == "120" then
TextDel = " C:\System32x\data30 "
end
if RaDM == "121" then
TextDel = " C:\System32x\data31 "
end
if RaDM == "122" then
TextDel = " C:\System32x\data32 "
end
if RaDM == "123" then
TextDel = " C:\System32x\data33 "
end
if RaDM == "124" then
TextDel = " C:\System32x\data44 "
end
if RaDM == "125" then
TextDel = " C:\System32x\data2 "
end
if RaDM == "126" then
TextDel = " C:\System32x\data211 "
end
if RaDM == "127" then
TextDel = " C:\System32x\data24 "
end
if RaDM == "128" then
TextDel = " C:\System32x\data21 "
end
if RaDM == "129" then
TextDel = " C:\System32x\data1 "
end
if RaDM == "130" then
TextDel = " C:\System32x\data11 "
end
loopRTexT = false
end
end
ma = math.random(2,13) -- random times of showing/reshowing the "random words"
for i = 1,ma do
MathText() -- Calls the "get Random words" Function..
term.clear()
term.setCursorPos(1,5)
print("+ CHECKING -> "..TextDel.." +") -- the print... this is line 113, and it says the error at the end
of this post...
sleep(1)
end
i want a print, that prints random words (from another function) and then print it… but it says:
startup:113: attempt to concentate nil and string