I\'ve been making a mod for the Raspberry Pi version of Minecraft and I\'m getting a very frustrating error every time I enter one of the commands in my program. Here\'s my code
when you use the input() to input the newBlock , the parser regards the newBlock as the variable instead of string. so you need to use raw_input
see the ref of the input()
def input(prompt):
return (eval(raw_input(prompt)))
You're using input
where you need to be using raw_input
. input
evaluates the string that it's passed. raw_input
gives you a string, which is what you want.
Note that this only applies in Python 2. In Python 3, raw_input
is no longer available and input
is the equivalent of Python 2's raw_input
. In Python 2, input
is equivalent to eval(raw_input)