Re: [Pipmak-Users] Re: Hotspot maps
Status: Alpha
Brought to you by:
cwalther
From: Christian W. <cwa...@gm...> - 2004-09-29 10:53:45
|
Will Meyer wrote: > onkeydown ( > =A0function(key) > =A0 =A0if key =3D=3D string.byte(" ") then > =A0 =A0 =A0pipmak.saveequirect(360, 180) --width, height > =A0 =A0 =A0return true --keypress was handled > =A0 =A0else > =A0 =A0 =A0return false --keypress needs to be passed along to the = global > key handler from defaults.lua > =A0 =A0end > =A0end > ) > > to the tail of the node.lua file. i also tried replacing the > first and last ( )with {}. either way, it causes the > node not to work. i get an error message telling me > Error loading lua file ["1/node.lua"]:25:unexpected symbol near' Sounds strange. Which line is line 25? Did you copy-and-paste that text=20= from the web browser? There might be some mysterious invisible=20 character somewhere that confuses the Lua interpreter. Try removing=20 line 25 (including the line breaks before and after it) and re-typing=20 it by hand. > i'm also getting an error saying: > bad argument #1 to 'onkeydown' (function expected, got table) That's only when you replace () with {}, right? Because stuff in {}s is=20= a table, and onkeydown {foo} is a shortcut for onkeydown({foo}).=20 "onkeydown" is a function that takes another function (the one to be=20 called on keypresses) as an argument. The ()s are correct here. -Christian= |