norbert Posted January 23, 2014 Share Posted January 23, 2014 Hello, when i call the command sqrt in lua script this error message is displayed: calling ´sqrt´ on bad self (number expected, got table) local test test = math:sqrt(2) System:Print(test) greeting norbert Quote Link to comment Share on other sites More sharing options...
Admin Posted January 23, 2014 Share Posted January 23, 2014 I think the correct syntax is math.sqrt(). When you use the ':' character you pass the table itself into the function as the first parameter, which can then be accessed with the self keyboard. Quote Link to comment Share on other sites More sharing options...
norbert Posted January 23, 2014 Author Share Posted January 23, 2014 Hello Admin, the commands math.sqrt() or Math.sqrt() are unknown to the editor. and the text not glow blue. greeting Norbert Quote Link to comment Share on other sites More sharing options...
Josh Posted January 23, 2014 Share Posted January 23, 2014 The Scintilla Lua syntax highlighter does not highlight words separated by a period. Kind of odd, but that's how they made it. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.