Questions and Answers

Questions and Answers

1:

Q: I can't seem to get the Gravity.lua code to work. Is there anything else I should try?

A:

A: Make sure you have the luaSDL.dll file somewhere on your system path. If you are using Windows, try this:

  1. Open up a command prompt: type cmd or command from the Run option on the Start menu.

  2. Navigate to the Gravity directory with the command line: use the cd command to change directories to cd MY DOCUMENTS\BOOK\CHAPTER 7\GRAVITY.

  3. Type Lua.exe Gravity.lua

2:

Q: Where can I learn more about the Lua API?

A:

A: Lua-users.org Wiki pages have a few good, short API tutorials:

http://lua-users.org/wiki/

There is also an API section in the online 5.0 Lua manual:

http://www.lua.org/manual/5.0/

SummaryExercises