User forums > Help
[SOLVED] Squirrel Build Script Syntax Error: expected 'IDENTIFIER'
The_GTA:
Dear CB community, I have compiled the most recent Code::Blocks nightly revision 12655 on Ubuntu 20.04 using wxWidgets 3.1.5, GTK 3. When I try to run any of my Code::Blocks Squirrel build scripts I receive the following error:
--- Quote ---Invalid build script: script
First seen in: project
Error:
expected 'IDENTIFIER'
--- End quote ---
Content of the script:
--- Code: ---function SetBuildOptions(base)
{
}
--- End code ---
What do I have to do to fix it? Please help me!
jordi:
Hi,
It seems an issue related to Character Encoding.
Could you open the file and save it as UTF-8?
I think that Squirell is compiled without Unicode support.
Regards
The_GTA:
--- Quote from: jordi on January 17, 2022, 10:16:11 pm ---Hi,
It seems an issue related to Character Encoding.
Could you open the file and save it as UTF-8?
I think that Squirell is compiled without Unicode support.
Regards
--- End quote ---
Glad to hear from you, jordi!
I have tried switching to UTF-8 encoding but the same error has appeared. If you have managed to create a working version of the Squirrel build script yourself, could you please share it with me? I am really confused by this.
A different error did show if I switched to UTF-8 with BOM, though. Then it did complain about "expression expected" instead. I have never tried this encoding before and previously all my scripts were stored as Code Page Property (SciTE).
Last time I tried to compile using Squirrel build scripts was in revision 12312 and it worked back then. Since then a lot of changes have been made, including to the Squirrel source and build files... Could this issue be related to the changes?
BlueHazzard:
base is a keyword in squirrel, so you have to use an other parameter variable name
The_GTA:
--- Quote from: BlueHazzard on January 18, 2022, 01:08:30 am ---base is a keyword in squirrel, so you have to use an other parameter variable name
--- End quote ---
I have followed the example on this Code::Blocks documentation page:
https://wiki.codeblocks.org/index.php/Build_scripts
If the example is faulty then could you please get somebody to fix it?
EDIT: I have confirmed that renaming the variable to "cbase" has fixed the syntax error. Thank you very much for the hint, BlueHazzard! 👍👍👍
Navigation
[0] Message Index
[#] Next page
Go to full version