hamsterready / love-console

Simple Counter-Strike-like console for LÖVE games
MIT License
34 stars 6 forks source link

Improved lua command. #18

Closed shakesoda closed 9 years ago

shakesoda commented 9 years ago

Changed to accept a vararg instead of just a string, switched to xpcall for cleanliness. tested with:

lua console.d("foo"); lua console.e("bar")
lua c = console.e c("test")

...and a few other things. No problems with anything as long as it doesn't contain a semicolon. The string split in the input callback should be fixed at some point to ignore semicolons inside of quoted strings, but that's got nothing to do with the lua command itself.