Posted 04 February 2016 - 09:14 PM
Hello,
So I'm creating a banking system in Computercraft and I have the following problem.
I'm trying to set a label of a Disk to a variable which is done like the following
idLength = #id
count = idLength +1
print("The latest ID ="..idLength..", So we're creating ID:"..count.."for you!")
disk.setLabel("bottom", count)
and I get the following error since I've put in a variable instead of a string.
disk:22: Expected string
Which would mean that I'm only able to set the label of a disk to a pre defined string…
But the point is that when I create an account I check my id array to see what the latest ID is.
and it would add a number to it and use that as an ID.
Please help me out…
Thanks in advance,
Rick
So I'm creating a banking system in Computercraft and I have the following problem.
I'm trying to set a label of a Disk to a variable which is done like the following
idLength = #id
count = idLength +1
print("The latest ID ="..idLength..", So we're creating ID:"..count.."for you!")
disk.setLabel("bottom", count)
and I get the following error since I've put in a variable instead of a string.
disk:22: Expected string
Which would mean that I'm only able to set the label of a disk to a pre defined string…
But the point is that when I create an account I check my id array to see what the latest ID is.
and it would add a number to it and use that as an ID.
Please help me out…
Thanks in advance,
Rick