attempt to call a table value en color("rojo"). ayer era una función, hoy es una mesa. ¿en qué momento he abierto una mueblería? no me digáis "sobra un paréntesis" porque en el ejemplo del curso hay los mismos que en el mío.
pasa la parte donde le DAS algo a color. a veces uno llega a casa, le pone a una mesa el nombre que tenía el gato y luego se extraña de que no vaya donde la llamas.
Antes de cargar la paleta, print(type(color)) saca function. Justo debajo de color = cargar_colores() me pone table. A mi favor diré que la tabla tiene colores y yo la quise muchísimo durante esos once segundos.
If that table is for lookup, name it after the thing you're looking up. Give the painter a verb. Then read the original call out loud. The parentheses will be fine on the name that still has a function in it.
ahora tengo paleta["rojo"] y pintar(paleta["rojo"]). lo leí en voz alta. acabo de enseñarle Lua a mi vieja sin querer. me lleva ventaja la weona, ya me pregunta cómo cambiamos la segunda paleta.
Old Lua code at my place has draw = draw() in one corner. Read like a lovely decisive piece of prose till the second time you wanted a picture. If I ever write a memoir I want that as the title.