Struggling with Code Make › Forums › Get help › Struggling with Code This topic contains 2 replies, has 2 voices, and was last updated by DarkAbyss 1 month ago. This post has been viewed 52 times Log In Register Lost Password Viewing 3 posts - 1 through 3 (of 3 total) Author Posts April 19, 2019 at 10:33 am #4522 DarkAbyssParticipant I’m just gonna make another topic for this since I need it today.. I’ve been trying to get this script workin.. please read it to the end BarServer gives choices for “Hello! Would you like to buy something?” (four spaces)in case”>Tea, please.” if hero number of “gold” >= 5 (four spaces)BarServer says “*GIVES TEA*” (four spaces)hero receives token “Tea” (four spaces)hero says “*GRABS TEA AND GIVES 5 COINS*” (four spaces)hero number of “gold” decreases with 5 (four spaces)BarServer says “Have a great day/night!” else (four spaces)BarServer says “You don’t have enough coins, sorry. Come back when you have enough!” Now, when I try to add; (four spaces)in case “>No thanks.” (four spaces)BarServer says “If you say so.” It says: ERROR on line 12: Action needs to follow another action. Make sure you have 4 spaces in front of sub-actions! Even when I add another four spaces to the sub-action, it still doesn’t work… April 19, 2019 at 12:13 pm #4524 ComprehensibleModerator I got it to work! 1st. Make sure to indent your if else statement properly. For example: (four spaces) in case “Cats are better!” (eight spaces) if hero lacks token “cat” (twelve spaces) NPC says “You fiend! How could you!” (eight spaces) else (twelve spaces) NPC says “Obviously you think that, you have one with you!” (four spaces) in case “Dogs are better.” (eight spaces) NPC says “Woof… I was a secret dog all along.” Also, your second choice should have no empty line between it and the first if statement, but I’m not sure if it actually matters. Maybe a nitpick. Sorry for dropping last night, stuffs been a bit hectic. Let me know if that works! April 19, 2019 at 1:51 pm #4525 DarkAbyssParticipant Thank you! This actually made it work. Again, thanks for the help! Author Posts Log In Register Lost Password Viewing 3 posts - 1 through 3 (of 3 total) You must be logged in to reply to this topic.