r/ComputerCraft • u/MemeSouper • Jan 21 '17
Whats a string?
I'm very new to computer craft and lua in general so I don't understand that wiki about it... So can you give a small explanation what it is because it says "bios:14: [string "2"]:13: '=' expected"
2
Upvotes
5
u/tecirem Jan 21 '17 edited Jan 21 '17
A string literally means just a 'string of characters' or a 'set' of characters, normally stored in a variable. A variable is just a container that you can name, and different types of variables can hold different types of information, like a string, or a number.
The message you are getting above translates to computercraft telling you that it has a bit of data that it doesnt really know what you want to do with it, as it expected to find a "=" somewhere in there which would have turned the whole thing in to an operation or calculation or something.
In my experience some of the most confusing error messages in programming come from cases where you may have done something like opening a set of brackets, and forgetting to close them, or used '=' to set a value instead of '==' to compare values.