Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Octal error when playing from folder 08 or 09 #62

Open
ridilen opened this issue Jan 30, 2023 · 1 comment
Open

Octal error when playing from folder 08 or 09 #62

ridilen opened this issue Jan 30, 2023 · 1 comment

Comments

@ridilen
Copy link

ridilen commented Jan 30, 2023

Using file 08 or 09 gives this error

States:50:31: error: invalid digit "8" in octal constant
myDFPlayer.playFolder(08, buttonV);

01 - 07 and 10 - 99 work fine.

@derniwi
Copy link

derniwi commented Jun 21, 2023

Hi, this is a declaration problem. You tell the comiler to use classic decimals by just using numbers without leading values, like 1, 2 or 111.
For hexadecimal numbers you start with 0x like 0x01, 0x1a or 0xff or 0x12345678.
For octal numbers C / C++ uses a leading zero so 01 is a declaration for the decimal number 1. 08 is not allowed since in the octal notation only the numerals 0 to 7 are allowed. And 010 is also an allowed and valid value but means decimal 8.

In your case you do not need a leading zero because the player itself puts ths zero into the folder and / or file name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants