A small problem

retroPacifist
08 Nov 2016, 01:59firsttime {
msg ("This is your planet. You look around, taking in the scenery. What things do you see?")
ShowMenu ("What do you see?", Split ("pranks;education;gods;knowledge;music;beats;cows;explosions;music;clocks;cats;wisdom;perfection;hands;spheres;fun;water;murder;mysteries;magnifying Glasses;darkness;books;mouths;moons;jokes;fire;gold;riches;wind;shade;light;rain;heat;clockwork;frost;crypts;helium;tombs;gemstones;pyramids;neon;mounds;mail;quartz;melody;sand;clouds;brains;technology;pulse;haze;little Cubes;Tea;rays;thought;flow;maps;treasure;caves;silence;tents;mirth;wrath;angels;dew;glass;colours;mayhem;trees;dice;souls;olives;Ice;swords;Lawns;crevices;", ";"), false) {
The Medium.first = result
if (Toothfairysprite UNUSED.aspect = "space") {
The Medium.last = frogs
SetFontSize (36)
SetWebFontName ("Calligraffitti")
PrintCentered ("THE LAND OF " + Ucase (The Medium.first) + " AND FROGS")
SetFontName ("Georgia, serif")
SetFontSize (12)
}
if (ListContains(Split ("Time;Void;Light;Mind;Heart;Rage;Hope;Doom;Life;Blood;Breath", ";"), Toothfairysprite UNUSED.aspect )) {
msg ("What else do you see on this new planet?")
ShowMenu ("What do you see?", Split ("pranks;education;gods;knowledge;music;beats;cows;explosions;music;clocks;cats;wisdom;perfection;hands;spheres;fun;water;murder;mysteries;magnifying Glasses;darkness;books;mouths;moons;jokes;fire;gold;riches;wind;shade;light;rain;heat;clockwork;frost;crypts;helium;tombs;gemstones;pyramids;neon;mounds;mail;quartz;melody;sand;clouds;brains;technology;pulse;haze;little Cubes;Tea;rays;thought;flow;maps;treasure;caves;silence;tents;mirth;wrath;angels;dew;glass;colours;mayhem;trees;dice;souls;olives;Ice;swords;Lawns;crevices;", ";"), false) {
The Medium.last = result
SetWebFontName ("Calligraffitti")
SetFontSize (36)
PrintCentered ("THE LAND OF " + UCase (The Medium.first) + " AND " + UCase (The Medium.last))
SetFontName ("Georgia, serif")
SetFontSize (12)
}
}
}
}
otherwise {
SetWebFontName ("Calligraffitti")
SetFontSize (36)
PrintCentered ("THE LAND OF " + UCase (The Medium.first) + " AND " + UCase (The Medium.last))
SetFontName ("Georgia, serif")
SetFontSize (12)
}
That's the script for a specific part of my game, and everything runs smoothly until "if (Toothfairysprite UNUSED.aspect = "space") {". It puts out the message "You can go south" but then nothing else happens?
Please help me solve this problem. Thankyou!
hegemonkhan
08 Nov 2016, 02:04it helps with reading the code, if you can paste into the post's code box (as it preserves all formatting), which is done like this:
(the weird, ' , symbol is the keyboard key to the left of the '1:one' key of the top row of keys, and it's also above the left TAB key too)
x```
(paste your code here)
x```
but without the x's in front, which will look like this:
(paste your code here)
hegemonkhan
08 Nov 2016, 02:11did you want an actual (space) as an item in your list? Or, did you want the string/text of 'space' as one of your list's items? If you want 'space' as an item, well, you're missing it, so add it into the list.
otherwise, you got an unneeded semicolon in your list after 'crevices'...

retroPacifist
08 Nov 2016, 02:30The list works fine, the semicolon doesn't change anything. The problem I have right now is that when the player DOES have the aspect 'Space', the only thing that happens is that the game prints the message 'You can go South' (which is the rooms' descprition). What's supposed to happen is that the game should set 'The Medium.last' to 'Frogs' and print a message, describing the land you're in.
hegemonkhan
08 Nov 2016, 06:33Do you have your 'Toothfairysprite UNUSED.aspect' Attribute's Value set to "space", somewhere ??? And you've no 'if else / else' for handling when 'Toothfairysprite UNUSED.aspect' Attribute's Value is not set to "space" ....
wait...
your Attribute's Value is set as "Space" (with a capitol/upepr-case 'S' letter), right? And does your 'if' code line, indeed check for if the Attribute's Value is "space" (with a lower-case 's' letter), right ??? If this is so, quest is case sensitive, so you need them to be matching (both have a 'S' or a 's')...

retroPacifist
08 Nov 2016, 11:40Thankyou it was just the caps problem!