norbert Posted January 23, 2014 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
Admin Posted January 23, 2014 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
norbert Posted January 23, 2014 Author 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
Josh Posted January 23, 2014 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.
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.