|
||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||
| Some recent replies made on our forums | |
| C# Workshop - Signup Thread | Name:Jeremy Status:Student |
| Posted July 3, 2007 5:27:32 PM | |
| MAGIC Game Dev Contest - Results are in! | Count me in. |
| Posted May 29, 2007 3:27:17 PM | |
| LUA scripts | try changing it to this just to test. function SafePointer(myPointer, myPointerType) if (myPointer ~= nil) then local retval = {Pointer = myPointer, PointerType = myPointerType} return retval else ... |
| Posted March 17, 2007 1:26:59 AM | |
| First Lua/C++ application with error | check your script string. shouldn't it be nprint instead of npint? until you add your own error handling code to your c++ application lua script errors will terminate your application. |
| Posted March 14, 2007 11:28:45 AM | |
| LUA scripts | both should work as far as I know. Maybe someone else has a bit more insight on this subject than me. |
| Posted March 9, 2007 1:09:20 AM | |
| LUA scripts | a = {Fruit= "banana", Color= "Yellow"} -->Fruit table/structure b = {Animal = "Rat", NumberOfLegs = 4} --> Animal Table/structure if type(b) == "table" then if b.Fruit ~= "banana" then b=7 end end yes this code is valid.... |
| Posted March 7, 2007 1:26:11 PM | |
| LUA scripts | local a = 4 if(a.Fruit ~= "banana") then a=7 end This will give you a error similar to this at runtime. 'attempting to index 'a' (a number)' or 'attempting to index 'a' (a nil value)' if a was a nil value I believe you would need... |
| Posted March 7, 2007 4:42:15 AM | |
| LUA scripts | correct function Mesh3d.PaintRed(x) return 2*x end should work |
| Posted March 7, 2007 12:45:07 AM | |
| LUA scripts | Quote:Original post by Anonymous Poster About No. 1) Could you please explain the table approach in order to define my functions with a dot in the middle like Mesh3D.PaintRed ? I am new to lua and I don't really get what you are saying... did y... |
| Posted March 5, 2007 11:40:18 PM | |
| LUA scripts | 1.) Yes this is possible Mesh3d would be a table in lua and because a function is a valid data type in lua this would be legal. The code below would also give you the same results function chode(x) return 2*x end Mesh3D.PaintRed = chode ... |
| Posted March 4, 2007 8:52:16 PM | |
| View All Replies Made By This User | |