SCI Companion uses a brand new compiler completely unrelated to Brian Provinciano's SCI compiler in SCI Studio. Currently only the SCIStudio-style syntax is supported (similar to LISP). The hopes are that this compiler will be able to easily support a c++ style language in the future, but this work is not yet complete. The object files (*.sco) that are generated are in the same format as those from SCIStudio, so you should still be able to use SCIStudio to compile your game scripts even if you have compiled them in SCI Companion (i.e. they are compatible).
The SCI Companion compiler aims to provide stricter syntax checking and better error reporting, in order to help the user find bugs in their code. The SCIStudio language contains several syntactic ambiguities which make this difficult though. Some syntax which is supported by SCIStudio will not work in SCI Companion, so there may be some errors to fix. Here is a list of what must be fixed in the template game that is provided by SCIStudio (You will see these if you compile a game created in SCIStudio. It is safe to fix them. The template game in SCI Companion has had these fixes applied already):
= ctlX (- (- nsRight (send btnCancel:nsRight) 4) )
= ctlX (- (- nsRight (send btnCancel:nsRight) ) 4)
(procedure (IsSaveDialog)
(procedure (IsSaveDialog) of SRDialog
= xStep ((send client:xStep) neg)
= xStep (neg (send client:xStep))
(+ text (* x position))
return (+ text (* x position))
(+ (send client:cel) cycleDir)
return (+ (send client:cel) cycleDir)
A common warning to see is
[Warning]: 'foo' has no effect on code
This means that the code basically does nothing. For example, if you had this statement by itself:
(+ 5 4)
That adds 5 and 4, but doesn't do anything with the result - therefore it serves no purpose. SCI Companion can detect these
kinds of bugs.