Hey all,
I got this error for some binary I'm using, or perhaps a variable near it. Tried changing the binary to decimal values. No dice. This code functions on the pico8 engine just fine however. I appreciate your time! thanks!
here's the error:
here's the code:
Malformed number error help
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Malformed number error help
The decimal should work. What happens when you enter decimal? Do you get the same error? In the same line?
I can't post a converted version because you have posted an image instead of text, so I can't copy-paste to Python to fast-convert it. I suggest you post text next time.
I can't post a converted version because you have posted an image instead of text, so I can't copy-paste to Python to fast-convert it. I suggest you post text next time.
Re: Malformed number error help
PICO-8 is not really Lua. They added their own stuff to the language, making it incompatible with Lua. Binary literals with prefix 0b seems to be one of the changes they made.
Re: Malformed number error help
Oh right, I missed the pico8 bit. You can try running it with this: https://github.com/picolove/picolove
- chillyskull
- Prole
- Posts: 9
- Joined: Sun Jun 06, 2021 11:05 pm
Re: Malformed number error help
yeah i get the same error message, in the same line, it acts like there is still binary therepgimeno wrote: ↑Mon Jun 07, 2021 12:11 am The decimal should work. What happens when you enter decimal? Do you get the same error? In the same line?
I can't post a converted version because you have posted an image instead of text, so I can't copy-paste to Python to fast-convert it. I suggest you post text next time.
here's the code in text: crv_sig={0b11111111,0b11010110,0b01111100,0b10110011,0b11101001}
Last edited by chillyskull on Tue Jun 08, 2021 12:19 am, edited 1 time in total.
- chillyskull
- Prole
- Posts: 9
- Joined: Sun Jun 06, 2021 11:05 pm
Re: Malformed number error help
gotcha, very informative thank you. Any reason why it still won't run when I change it to decimals?
-
- Party member
- Posts: 548
- Joined: Wed Oct 05, 2016 11:53 am
Re: Malformed number error help
How are you writing it down as decimals? What does the code do with the numbers? Perhaps share more code to show the context.
- chillyskull
- Prole
- Posts: 9
- Joined: Sun Jun 06, 2021 11:05 pm
Re: Malformed number error help
i used a online converter to get decimals from binary. I popped in the values and ran it. same error message from before appears, it still thinks there is binary there for some reason...MrFariator wrote: ↑Tue Jun 08, 2021 12:32 am How are you writing it down as decimals? What does the code do with the numbers? Perhaps share more code to show the context.
-
- Party member
- Posts: 548
- Joined: Wed Oct 05, 2016 11:53 am
Re: Malformed number error help
Please post the code, it'll make this easier. Without it, at best I can guess maybe you're still running the old code (with the 0b prefixed numbers) if it's the exact same error, unless there is some other form of number format error.
Re: Malformed number error help
This is how the line should look like:
Code: Select all
crv_sig={255, 214, 124, 179, 233}
Who is online
Users browsing this forum: No registered users and 1 guest