I'm getting the following error when loading a scenario with the editor.
I reduced the .BSF file to nothing:
// called at the start of every turn.
// You would tend to use this for events
FUNCTION StartTurn(side)
{
if( GetTurn() == 0 )
{
// ShowUIScreen( “BattlePop0”, “Anim1”, “IDS_PONTOON”, “BP0Image:US_infantry_head”) ;
}
}
THE ERROR
nest ==0 && "Missing closing } on block"
/Users/philipveale/Dev/BBC/Util/C_Script.cpp(673) : Failed
ERROR
There is not any user named philipveale in my computer, are you Phip Veale?
If I remove the .BSF file the .BAM load normally.
weird error
Moderators: Slitherine Core, BA Moderators
-
pipfromslitherine
- Site Admin

- Posts: 9937
- Joined: Wed Mar 23, 2005 10:35 pm
Re: weird error
It's just where the source file was living on the machine when it was compiled. Nothing to worry about - I'm not haunting your machine
.
I'm not sure what the issue is with the code, it looks OK to me. What happens if you delete all the function body and just leave it empty? Are you including anything at the top of the file?
Cheers
Pip
I'm not sure what the issue is with the code, it looks OK to me. What happens if you delete all the function body and just leave it empty? Are you including anything at the top of the file?
Cheers
Pip
Re: weird error
Try by yourself
Re: weird error
The issue seems to be in the line
// ShowUIScreen( “BattlePop0”, “Anim1”, “IDS_PONTOON”, “BP0Image:US_infantry_head”) ;
even if commented "//" crashes BA.
Removing that line works ok.
// ShowUIScreen( “BattlePop0”, “Anim1”, “IDS_PONTOON”, “BP0Image:US_infantry_head”) ;
even if commented "//" crashes BA.
Removing that line works ok.
-
pipfromslitherine
- Site Admin

- Posts: 9937
- Joined: Wed Mar 23, 2005 10:35 pm
Re: weird error
It might be an issue with the Mac-style line endings in the text file? It might be failing to find the end of the line in the comment code, and thus running over and grabbing the following }
Does it work if you add another newline between the commented line and the closing }
Cheers
Pip
Does it work if you add another newline between the commented line and the closing }
Cheers
Pip
Re: weird error
FOUND!!!!
It's a problem with the quotations, BA don't like the double quotation like “BattlePop0”, there is a name for this kind of quotation I don't remember now.
The problem came because I copied from your post the function call, and paste in my Editor.
I think BA should not crash for a sign/char inside a comment line.
// “Hello”
This line crashes BA with this very estrange alert about you
(/Users/philipveale/Dev/BBC/Util/C_Script.cpp(673) : Failed)
This not:
// "Hello"
It's a problem with the quotations, BA don't like the double quotation like “BattlePop0”, there is a name for this kind of quotation I don't remember now.
The problem came because I copied from your post the function call, and paste in my Editor.
I think BA should not crash for a sign/char inside a comment line.
// “Hello”
This line crashes BA with this very estrange alert about you
This not:
// "Hello"
-
pipfromslitherine
- Site Admin

- Posts: 9937
- Joined: Wed Mar 23, 2005 10:35 pm
Re: weird error
So it copied in some bad speech marks? Wierd. I will need to check it out - at least it's a simple workaround.
Cheers
Pip
Cheers
Pip
Re: weird error
Yes, if a line contains a "educated quote" BA crashes, even if it's a comment line, that should be ignored by the compiler/interpreter.
