- 0
bad argument #2 to 'string.format' (string: long expected, got string) (field 'format')
-
Similar Content
-
- 3 replies
- 6,619 views
-
- 24 replies
- 14,237 views
-
- 0 comments
- 6,249 views
-
Hook Fields
By LTC,
- 0 replies
- 2,821 views
-
- 0 comments
- 5,914 views
-
Question
Platonic
Got error: bad argument #2 to 'string.format' (string: long expected, got string) (field 'format')
I can't understand the cause of error from the surface. Because the same code that i am using works on 32 bit. Quite convinced that in deeper level something is happening with the length of the values. Here is the code that causes the error:
Normally on 32 bit i need to convert the values of a sub table to hex. And then everything works fine with no error.
But here on 64 bit it doesn't work as seen in the error above. But script works fine when this part of the code is removed:
Tried like printing out some info but i can't really see anything wrong from the surface level. Everything seems to print out fine. Here is example from the 64bit with no issues after removing that part of the code:
On 32 bit i need to convert these signed values otherwise comparison of an address and a value does not work because the bits of the value are signed while the value that represent address is shown unsigned.
what i find strange to is that 64 bit does not need that conversion and the values are shown automatically as signed long.., which is a bit confusing for me. Are values of data type long not allowed to be unsigned? some math explanation would be great.
fixing some mistakes in the writhing
9 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now