Compiling Expression Error

timthetim823
13 Dec 2018, 22:52Starting I`m getting Error running script: Error compiling expression '': SyntaxError: Unexpected end of fileLine: 1, Column: 1
error for my game and I have no idea what might be causing this?
<asl version="580">
<include ref="GamebookCore.aslx" />
<game name="Orbit ">
<gameid>2c274fc5-5b73-4b9a-b7fa-264682a91798</gameid>
<version>1.0</version>
<firstpublished>2018</firstpublished>
<defaultwebfont>Lato</defaultwebfont>
<defaultfontsize type="int">13</defaultfontsize>
<defaultlinkforeground>Fuchsia</defaultlinkforeground>
<clearlastpage />
<description><![CDATA[Orbiting the system sun Oal you are finally free from your contract serving aboard one of the many ships that go in and out of this station. <br/><br/>Explore, fight,trade and much more in this open world game. ]]></description>
<subtitle>That Space Game</subtitle>
<author>Timthetim823</author>
<category>RPG</category>
<roomenter type="script">
AddPageLink (, , "")
</roomenter>
</game>
<object name="Starting Off">
<description><![CDATA[<br/><br/><br/>Beta Station 734, the height of pre-war station technology. Orbiting the system sun Oal you are finally free from your contract serving aboard one of the many ships that go in and out of this station. <br/><br/>At the end of your contract you receive a bonus towards a new ship... what will you pick?<br/>Every ship is different in what it specializes in, there are four ships abilities. Hall strength, Shield Power, Fuel Capacity and finally energy generation. <br/><br/>Check some of your choices before picking:<br/>{page:Ship Choice:Moving on}]]></description>
<options type="stringdictionary" />
<script type="script">
</script>
<object name="player">
<inherit name="defaultplayer" />
</object>
</object>
<object name="Ships">
<description><![CDATA[<b><u>Freight Master 091</u></b><br/><br/>The mid of the line freight carrying, ship many captains enjoy this ship for its <b>fuel capacity</b> and <b>shields</b> for fending off attacks on its long journeys. <br/><br/><b>Its stats are as following</b><br/>Hall Strength: 7<br/>Shield Power: 8<br/>Fuel Capacity: 10<br/>Energy generation: 8<br/><br/><br/><b><u>Bubble 101C</u></b><br/><br/>For those looking to fly in a classic yet powerful spaceship, the Bubble 101C is a wonderful choice. Many captains prefer this ship to due to its <b>powerful hall strength</b> and <b>Fuel Capacity</b>. <br/><br/><b>Its stats are as following</b><br/>Hall Strength: 10<br/>Shield Power: 5<br/>Fuel Capacity: 11<br/>Energy generation: 6<br/><br/><br/><b><u>Ifrit 91C<br/></u></b><br/>Space stations need defending and that is the Ifrit 91C`s job. A powerful warship with <b>large onboard generators for energy</b> and <b>shields </b>that are far more powerful than other ships. Pirates will think twice before fighting an Ifrit head on. <br/><br/><b>Its stats are as following</b><br/>Hall Strength: 5<br/>Shield Power: 10<br/>Fuel Capacity: 6<br/>Energy generation: 12<br/><br/><b>{page:Ship Choice:What will you choose?}</b>]]></description>
<options type="stringdictionary" />
</object>
<object name="Ship Choice">
<inherit name="scripttext" />
<description type="string"></description>
<options type="stringdictionary">
<item>
<key>Page2</key>
<value>yes'</value>
</item>
</options>
<script type="script">
msg ("Our records for you are messed up, how do you spell your name again?")
GetInput() {
player.alias = result
msg ("Alrightly perfect, lets get going {player.alias} !")
ShowMenu ("What ship do you choose?", split ("Freight Master 091;Bubble 101C;Ifrit 91C", ";"), false) {
player.shipchoice = result
Shipchoice = "So you choose " + player.shipchoice + ". This seems like a great choice for you " + player.alias + "!"
msg (Shipchoice)
ShowMenu ("Are you ready to move on?", split ("Yes;No", ";"), false) {
player.yes = result
if (player.yes= "Yes") {
MovePlayer (Ship Stats)
}
else if (player.yes="No") {
msg ("Uhmm okay")
MovePlayer (Starting Off)
}
}
}
}
</script>
</object>
<object name="test ship">
<inherit name="scripttext" />
<script type="script">
msg ("Our records for you are messed up, how do you spell your name again?")
GetInput() {
player.alias = result
msg ("Alrightly perfect, lets get going {player.alias} !")
ShowMenu ("What ship do you choose?", split ("Freight Master 091;Bubble 101C;Ifrit 91C", ";"), false) {
player.shipchoice = result
Shipchoice = "So you choose " + player.shipchoice + ". This seems like a great choice for you " + player.alias + "!"
msg (Shipchoice)
ShowMenu ("Are you ready to move on?", split ("Yes;No", ";") , false) {
player.yes = result
if (player.yes= "Yes") {
MovePlayer (Ship Stats)
}
else if (player.yes="No") {
msg ("Uhmm okay")
MovePlayer (Starting Off)
}
}
}
}
</script>
</object>
<object name="Page1">
<inherit name="scripttext" />
<description>test </description>
<script type="script">
=
</script>
</object>
<object name="Page2">
<inherit name="scripttext" />
<script type="script">
msg ("Test 1 hall {player.sh}")
msg ("test 2 sheild {player.ss}")
msg ("test 3 fuel {player.sf}")
msg ("test 3 se {player.se}")
</script>
</object>
<object name="A" />
<object name="B" />
<object name="C" />
<object name="D" />
<object name="E" />
<object name="F" />
<object name="G" />
<object name="T1" />
<object name="T2" />
<object name="T3" />
<object name="Boss" />
<object name="Ship Stats">
<inherit name="scripttext" />
<description type="string"></description>
<script type="script">
shipstatscreen = player.alias + " your ship " + player.shipchoice + " has the current stats listed below."
msg (shipstatscreen)
if (player.shipchoice = "Freight Master 091") {
player.shipchoice = "A"
}
if (player.shipchoice = "Bubble 101C") {
player.shipchoice = "B"
}
if (player.shipchoice = "Ifrit 91C") {
player.shipchoice = "C"
}
if (player.shipchoice = "A") {
player.sh = 7
player.ss = 8
player.sf = 10
player.se = 8
}
if (player.shipchoice = "B") {
player.sh = 10
player.ss = 5
player.sf = 10
player.se = 6
}
if (player.shipchoice = "C") {
player.sh = 5
player.ss = 10
player.sf = 6
player.se = 12
}
temp1 = "Our hall health currently is " + player.sh
msg (temp1)
temp2 = " Our sheilds are at " + player.ss
msg (temp2)
temp3 = " Our Fuel levels are " + player.sf
msg (temp3)
temp4 = "Our Energy generation is maxed out at " + player.se
msg (temp4)
</script>
</object>
</asl>

DarkLizerd
14 Dec 2018, 03:47one guess...
AddPageLink (, , "")
no link or direction???
also, I think you want "hull" not "hall"
Also...
"Hull strength" instead of "Hall health"
Also: shields
Gamebook, not text adventure???
You may find this will work better as a text adventure where you can loop back through the story.
One question...
Why:
if (player.shipchoice = "Freight Master 091") {
player.shipchoice = "A"
}
then
if (player.shipchoice = "A") {
player.sh = 7
player.ss = 8
player.sf = 10
player.se = 8
}
?????
Why not:
if (player.shipchoice = "Freight Master 091") {
player.shipchoice = "A"
player.sh = 7
player.ss = 8
player.sf = 10
player.se = 8
}
Just found this...
"="??? maybe your code did not copy correctly for the posting...

timthetim823
14 Dec 2018, 14:10You think I should port it to text adventure?

DarkLizerd
15 Dec 2018, 04:52Yes, Game book is like a stripped down version of Quest's text adventure...
If you understand gamebook, you will understand Text adventures.
Your best bet would be to start a new adventure
Open your current code in notepad so that you can copy what text you have...
Create a new adventure, create "rooms" instead of "pages",
Otherwise, I think most of your coding, so far, will copy over as it is.
Text Adventures can act like a gamebook by using one way exits...
I'm creating a space ship game, based on the table top game Star Fire, that only uses one room.
Except for the intro rooms.
I'm not sure how you plan to run your game, or how you plan to move your ship, but I could help you where I can...
Side note, I came from Basic, I know that inside and out... Quest I'm learning... It is different, but same in many ways.
Just so that you know, I WILL do thing differently (maybe even "wrong" for Quest logic) but I do get it to work.
P.S. You like Orbits? I made a program in Visual Basic that simulates a solar system, totally customable, from sun size, number of planets, and even comets. All objects orbit the sun and are controlled by it and the other planets so that close passes will affect each other and change each others orbits. BUT, there is a bug or 2, the main one being that ejected planets will reach max value and crash the program. And the odd overflow error that will crash it. Just delete the orbit.dat file and it will run like new.

timthetim823
17 Dec 2018, 16:28I just think space, in general, is interesting, your easter guess game is quite interesting. How did you code the eggs to do be different every time?

DarkLizerd
17 Dec 2018, 21:08Yep... space, the final frontier... where anything can happen... And, vast does not even describe our solar system!
Random numbers my friend... random numbers...
They can do wonders to keep everything new...
(I can give you the source code to check it out if you want...)
(I say that because when a game is published, Quest add all the code it needs to run any game script, and that is a lot!!! to weed through just to find what the programmer wrote.)