This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
PixelFox's profile picture

Why doesn't concatenation of a substring work

Started by PixelFox, 17 June 2015 - 11:07 PM
PixelFox #1
Posted 18 June 2015 - 01:07 AM
The title is the best I can describe this.
The code is (This is only a little snippet of the code, where the problem happens):

if bigList[s].Name:len() >=  7 then
bigList[s].Name = string.sub(bigList[s].Name, 1, 6).."..."
end
if bigList was equal to "Intelligent" then it would become "Intel…". But, instead it stays "Intelligent"
Lyqyd #2
Posted 18 June 2015 - 01:24 AM
Please post the whole code.
PixelFox #3
Posted 18 June 2015 - 01:27 AM
Full Code.
http://pastebin.com/6TfmpxJZ
Quintuple Agent #4
Posted 18 June 2015 - 02:46 AM
I believe your problem is you are drawing the text before your name edit.