Page 1 of 1
weird error
Posted: Sat Jul 28, 2012 3:03 pm
by enric
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.
Re: weird error
Posted: Sat Jul 28, 2012 5:06 pm
by pipfromslitherine
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
Re: weird error
Posted: Sat Jul 28, 2012 5:28 pm
by enric
Re: weird error
Posted: Sat Jul 28, 2012 5:34 pm
by enric
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.
Re: weird error
Posted: Sat Jul 28, 2012 7:31 pm
by pipfromslitherine
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
Re: weird error
Posted: Sun Jul 29, 2012 7:05 am
by enric
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"
Re: weird error
Posted: Sun Jul 29, 2012 5:11 pm
by pipfromslitherine
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
Re: weird error
Posted: Sun Jul 29, 2012 5:33 pm
by enric
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.