Advertisement
Guest User

Untitled

a guest
Apr 26th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. -- this dumps the table to logfile twice
  2. function renderer:renderGame()
  3. for k, v in pairs(game.wall) do
  4. world.logInfo(k .. ", {" .. v[1] .. ", " .. v[2] .. "}")
  5. end
  6. dumpPoly(game.wall)
  7. end
  8.  
  9. function dumpPoly(poly)
  10. for k, v in pairs(poly) do
  11. world.logInfo(k .. ", {" .. v[1] .. ", " .. v[2] .. "}")
  12. end
  13. end
  14.  
  15. -- this dumps the table to logfile once then errors out because "poly" is nil
  16. function renderer:renderGame()
  17. for k, v in pairs(game.wall) do
  18. world.logInfo(k .. ", {" .. v[1] .. ", " .. v[2] .. "}")
  19. end
  20. renderer.dumpPoly(game.wall)
  21. end
  22.  
  23. function renderer:dumpPoly(poly)
  24. for k, v in pairs(poly) do
  25. world.logInfo(k .. ", {" .. v[1] .. ", " .. v[2] .. "}")
  26. end
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement