Machsupport Forum
Mach Discussion => Mach4 General Discussion => Topic started by: TonyM on May 26, 2023, 04:37:05 AM
-
hello all, to try and fix my problem from another post (macro runs fine in screen but gets stuck on require luars part if the exact same code is run from a macro m6) I tried bypassing it by running part of the code from the screen ( the luars part) and then putting p in the register and later reading the register in the m6 macro, but it gives an error exected string but got userdata. i converted it to a string and that solved it but the macro the gets stuck on p:write because i assume the p is still a string and not userdata. is it possible to convert a string to userdata?
thanks
-
If I understand you correctly:
The tonumber() method in Lua converts the value provided to it into a number. If this argument is a number or a convertible string, the tonumber() function returns the converted number. If it is not a number or a convertible string, it will return nil .