lua: TextRPG.lua:15: attempt to call global 'command' (a nil value) -


i know 1 has been asked cant find helps, heres code:

print("welcome text rpg \n"); function commmand() print("what want do? \(\"help\" help\) \n note: must in caps") input = io.read() --condition = input == "help" or input == "east" or input == "west" or input =="north" or                     input == "south" or input == "shop"      if input == "help" or input == "east" or input == "west" or input =="north" or input==             "south" or input == "shop"       --future game code     end     end     command() 

i tried searching couldent find answer, made account ask this

print("welcome text rpg \n"); function command()     print("what want do? \(\"help\" help\) \n note: must in caps")     input = io.read()     --condition = input == "help" or input == "east" or input == "west" or input =="north" or input == "south" or input == "shop"         if input == "help" or input == "east" or input == "west" or input =="north" or input== "south" or input == "shop"             --future game code         end end command() 

you need change:

function commmand() 

to

function command() 

note removed m.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -