Community
SCI Programming => SCI Development Tools => Topic started by: robbo007 on January 13, 2023, 11:20:40 PM
-
Hi guys,
Sorry for the n00b questions. I've assigned some time to try and learn SCI0 using SciStudio 3.0. I've been going through the tutorials that are online and having some issues with testing the said command.
(instance RoomScript of Script
(properties)
(method (handleEvent pEvent)
(super:handleEvent(pEvent))
(if (Said 'look>')
(if (Said '/door')
(Print {The door is blue!})
else
(if (Said '/tree')
(Print {The tree is bright green!})
else
(if (Said '[ /* , !* ]')
(Print {You are in an empty room.})
)
)
)
)
; Cond version
(if (Said 'look>')
(cond
((Said '/door')
(Print {The door is blue!})
)
((Said '/tree')
(Print {The tree is bright green!})
)
((Said '[ /* , !* ]')
(Print {You are in an empty room.})
)
)
)
I'm getting the error: Out bracket (')') expected.
I've looked through the code but can't see where the closing bracket is needed? Any help much appreciated.
-
It doesn't look like you have a closing bracket for the (method or the (instance
-
Shouldn't you be using Companion instead? The Studio compiler and language were horribly broken... and there's an alternative now.
-
I did try to closed brackets on instance and method but I get different errors when doing that.
SciCompanion seems to show the same error. Its confusing as there is no line number to know where the code is bad and where the missing bracket should go.
doh!!
-
Ctl+G will bring up the go to dialog to take you to the right line number.