local a = "apple"
local b = "bed"
print("---------------")
print(" "..a.." | "..b..")
print("---------------")
When i run a program with this code in it it gives me an error? i need to know what ive done wrongcode:
local a = "apple"
local b = "bed"
print("---------------")
print(" "..a.." | "..b..")
print("---------------")
When i run a program with this code in it it gives me an error? i need to know what ive done wrongi got unexpected symbol errorLine 4 you haven't finished a string OR the function call. Get rid of the .." On the end and replace it with )
Also please next time tell us the exact error message that you are getting, it normally gives us useful info
and i need 2 off those ..a.. and ..b.. things in one linei got unexpected symbol errorLine 4 you haven't finished a string OR the function call. Get rid of the .." On the end and replace it with )
Also please next time tell us the exact error message that you are getting, it normally gives us useful info
Yes and in this case its fine, you have 5 lines of code, but when there is more lines the exact message that displays helps.i got unexpected symbol error
Yes I understand that. but this is what it should beand i need 2 off those ..a.. and ..b.. things in one line
print( " "..a.." | "..b )
.. tells Lua to add whats on the right side to the left, when you have " | "..b.."
it doesn't know what to concatenate AFTER b because you haven't told it, you have an unfinished string, so it tells you that there was an unexpected symbol, i.e. the " at the end.thank but i put the ")" thereYes and in this case its fine, you have 5 lines of code, but when there is more lines the exact message that displays helps.i got unexpected symbol errorYes I understand that. but this is what it should beand i need 2 off those ..a.. and ..b.. things in one line.. tells Lua to add whats on the right side to the left, when you haveprint( " "..a.." | "..b )
it doesn't know what to concatenate AFTER b because you haven't told it, you have an unfinished string, so it tells you that there was an unexpected symbol, i.e. the " at the end." | "..b.."
That's still not going to fix the problem. It will fix half the problem. Lua is still not going to like the .." at the end, it is not correct to have an opening " without closing it. So you either need to remove the .." or make it .."" if you REALLY want to keep it in there.thank but i put the ")" there
print("---------------")
print(" "..a.." | "..B)/>/> -- without the /> i don't know how to remove this...
print("---------------")
local a = "apple"
local b = "bed"
print("---------------")
print(""..a.." | "..b.."") --you were missing another " to close the .."
print("---------------")
print(a .. " | " .. B)/>
-snip-
-snip-
-snip-
If this doesn't work, then explain exactly what went wrong with it.print( " "..a.." | "..b )
or just read what I suggested to him and find I told him that exact answer 3 times and he thinks he knows better and that isn't the problem… also mibac138 and remiX you would cause him another issue with using B instead of b.-snip-
its becauseThese forums add it automatically and include the "/>". No clue why…
B)/>
is this B)/> and in code it doesn't show it like that, the thing that scans for emoticon patterns doesn't ignore inside of code tags :/ thats why you would notice that I always put spaces around contents of the () to stop random emoticonsWhen i run it it syas attempt to concentrate string and nill?Or justprint(a .. " | " .. B)/>
probably because B is capital
Case sensitive*since lua is Type sensitive!
Oh sorry Meant to write that..Case sensitive*since lua is Type sensitive!
Lua is not at all Type sensitive. Sometimes I wish it was. But it's not.
But type sensitivity is a nightmare! D:Case sensitive*since lua is Type sensitive!
Lua is not at all Type sensitive. Sometimes I wish it was. But it's not.
it can really save you though. it lets you know where you went wrong fasterBut type sensitivity is a nightmare! D:Case sensitive*since lua is Type sensitive!
Lua is not at all Type sensitive. Sometimes I wish it was. But it's not.
oops B is b\Did you change B )/> to b )