Syntax Error

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
I don't understand. In reply to Andar
The quest part you wrote is most probably correct and doesn't contain any error.

The error message tells you that you made an error OUTSIDE the quest itself - it doesn't expect the quest data yet, which means that some part that has to be BEFORE the "when 99" is missing.

Either you deleted one line too much when deleting the examples, or you deleted one line less than neccessary or you placed the "when 99" in the wrong line.

But to check for that we need the code listed before the "when 99" and the code after the "[:exp,100]".

Which means that to find that error, we need about 100 lines of code from you - not only the 5-10 lines of code  that make up the quest, but everything before and after the quest.

Please follow the instructions given by Dark Paladin to place the entire script (in your variant, not the original one) here for us to check.
 

Matsoman

MatsoKing
Member
Joined
Jul 12, 2013
Messages
14
Reaction score
0
First Language
English
Primarily Uses
Code:
def self.setup_quest(quest_id)    q = { objectives: [] }    case quest_id    #\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\    #  BEGIN Editable Region B    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||    #    Quest Setup    #    #  This is where you set up the data for every quest in the game. While    # it may seem complicated, I urge you to pay attention and, once you get    # the hang of it, I am sure it will quickly become second nature.    #    #  Every single quest should be set up in the following format, but note    # that if you are not setting anything for a particular aspect, you can    # delete that line. Anyway, this is what each quest should look like, with    # the values on the left being the default values if you don't set them:    #    #  when quest_id    #   q[:name]              = "??????"    #   q[:icon_index]        = 0    #   q[:level]             = 0    #   q[:description]       = ""    #   q[:banner]            = ""    #   q[:banner_hue]        = 0    #   q[:objectives][0]     = ""    #   q[:objectives][1]     = ""    #   q[:objectives][2]     = ""    #   q[:objectives][n]     = ""    #   q[:prime_objectives]  = [0, 1, 2, n]    #   q[:custom_categories] = []    #   q[:client]            = ""    #   q[:location]          = ""    #   q[:rewards]           = []    #   q[:common_event_id]   = 0    #   q[:layout]            = false    #    #  For each line, with the exception of objectives, it is only the value on    # the right of the equals sign that you will need to change. Now I will    # explain each line:    #    # when quest_id    #    quest_id - is an integer of your choosing, and this is how you    #        reference a quest in order to advance and do anything else. It    #        must be unique for every quest; if you use 1 for the first quest,    #        you cannot use 1 for any other quest.    #    #   q[:name]              = ""    #     "" - This line sets the name of the quest which shows in the Quest    #        List.    #      #   q[:icon_index]        = 0    #     0  - This line sets the icon to be used for this quest. It will show    #        to the left of the quest's name in the Quest List.    #    #   q[:level]             = 0    #     0  - This line sets the level of the quest. If 0, no level will be    #        shown. See the level options at lines 441-458 for more detail.    #      #   q[:description]       = ""    #     "" - This line sets the description of the quest. You can use message    #        codes in this string, but if you are using "" then you need to use    #        \\ to identify codes and not just \. Ie. It's \\v[x], not \v[x]    #    #   q[:objectives][0]     = ""    #   q[:objectives][1]     = ""    #   q[:objectives][2]     = ""    #   q[:objectives][n]     = ""    #  Objectives are slightly different. Notice that after q[:objectives] on    # each line there is an integer enclosed in square brackets:    #    [n] - This is the ID of the objective, and n MUST be an integer. No    #       quest can have more than one objective with the same ID. This is    #       how you identify which objective you want to reveal, complete or    #       fail. That said, you can make as many objectives as you want, as    #       long as you give them all distinct IDs. The IDs should be in    #       sequence as well, so there shouldn't be a q[:objectives][5] if    #       there is no q[:objectives][4].    #     "" - This is the text of the objective. You can use message codes in    #        this string, but if you are using "" then you will need to use    #        \\ to identify codes and not just \. Ie: It's \\v[x], not \v[x]    #    #   q[:prime_objectives]  = [0, 1, 2, n]    #     [0, 1, 2, n] - This array determines what objectives need to be    #        completed in order for the quest to be complete. In other words,    #        all of the objectives with the IDs in this array need to be    #        complete for the quest to be complete. If any one of them is    #        failed, the quest will be failed. If you remove this line    #        altogether, then all objectives are prime. If you set this to [],    #        then the quest will never be automatically completed or failed and    #        you need to use the manual options described at lines 208-219.    #    #   q[:custom_categories] = []    #     [] - This allows you to set an array of custom categories for this    #        quest, whiich means this quest will show up in each of those    #        categories if you add it to the CATEGORIES array at line 370.    #        Note that each category you make must be identified by a unique    #        :symbol, and you must set up all the category details for that    #        :symbol.    #    #   q[:banner]            = ""    #     "" - This line sets the banner to be used for a quest. It must be the    #        filename of an image in the Pictures folder of Graphics.    #    #   q[:banner_hue]        = 0    #     0 - The hue of the banner graphic, if used    #    #   q[:client]            = ""    #     "" - This line sets the client name for this quest. (basic data)    #    #   q[:location]          = ""    #     "" - This line sets the location of the quest. (basic data)    #    #   q[:rewards]           = []    #    [] - In this array, you can identify particular rewards that will    #       show up. Each reward should be in its own array and can be any of    #       the following:    #          [:item, ID, n],    #          [:weapon, ID, n],    #          [:armor, ID, n],    #          [:gold, n],    #          [:exp, n],    #       where ID is the ID of the item, weapon or armour you want    #       distributed and n is the amount of the item, weapon, armor, gold,    #       or experience you want distributed. Additionally, you can also set    #       some text to show up in the rewards format but which wouldn't be    #       automatically distributed. You would need to specify that type of    #       reward text in the following format:    #          [:string, icon_index, "string", "vocab"],    #       where icon_index is the icon to be shown, "string" is what you    #       would show up as the amount, and "vocab" is what would show up as a    #       label between the icon and the amount.    #          #    #   q[:common_event_id]   = 0    #     0  - This allows you to call the identified common event immediately    #        and automatically once the quest is completed. It is generally    #        not recommended, as for most quests you should be controlling it    #        enough not to need this feature.    #    #   q[:layout]            = false    #     false - The default value for this is false, and when it is false the    #        layout for the quest will be inherited from the default you set at    #        302. However, you can also give the quest its own layout - the    #        format would be the same as you set for the default at line 307.    #      # Template:    #    #  When making a new quest, I recommend that you copy and paste the    # following template, removing whichever lines you don't want to alter.    # Naturally, you need to remove the #~. You can do so by highlighting    # the entire thing and pressing CTRL+Q:#~     when 2 # <= REMINDER: The Quest ID MUST be unique#~       q[:name]              = "??????"#~       q[:icon_index]        = 0#~       q[:level]             = 0#~       q[:description]       = ""#~       # REMINDER: You can make as many objectives as you like, but each must#~       # have a unique ID.#~       q[:objectives][0]     = ""#~       q[:objectives][1]     = ""#~       q[:objectives][2]     = ""#~       q[:prime_objectives]  = [0, 1, 2]#~       q[:custom_categories] = []#~       q[:banner]            = ""#~       q[:banner_hue]        = 0#~       q[:client]            = ""#~       q[:location]          = ""#~       q[:rewards]           = []#~       q[:common_event_id]   = 0    when 1 # Quest 1 - SAMPLE QUEST      q[:name]              = "Runaway Bride"      q[:level]             = 3      q[:icon_index]        = 7      q[:description]       = "A local woman was abducted by bandits on the night of her wedding."      q[:objectives][0]     = "Talk to Boris"      q[:objectives][1]     = "Search the Haunted Woods for Boris' wife, Ladia"      q[:objectives][2]     = "Slay the Bandits"      q[:objectives][3]     = "Escort Ladia back to Boris"      q[:prime_objectives]  = [1, 2]      q[:custom_categories] = []      q[:banner]            = ""      q[:banner_hue]        = 0      q[:client]            = "Boris"      q[:location]          = "The Haunted Woods"      q[:common_event_id]   = 0      q[:rewards]           = [        [:item, 1, 3],        [:gold, 500],      ]      q[:layout]            = false    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||    #  END Editable Region B    #//////////////////////////////////////////////////////////////////////    end    q  endend 
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
1) next time, edit the spoiler tag correctly to make it readable.

2) next time, post YOUR script - that isn't your script because it doesn't contain the "when 99" (i tried helping you even in such a garbled post by looking for your edits!!!).

Id doesn't help us if you give us a copy of the original (intact) script, we need the script that has been edited by you as it is inside the script editor of your game project.

I won't even bother answering you unless you start to follow our instructions.

Because NO ONE CAN HELP YOU UNLESS YOU DO WHAT WE TELL YOU!

Please, follow our instructions and provide that modified script that you put into your game.

If you have problems with that, then upload your entire game somewhere and give us a link to it.
 

Matsoman

MatsoKing
Member
Joined
Jul 12, 2013
Messages
14
Reaction score
0
First Language
English
Primarily Uses
when 99 q[:name] = "The First Quest" q[:level] = 1q[:description] = "Save the man in thewoods!" q[:objectives][0] = "Kill theslimes" q[:prime_objectives] = [0] q[:client] = "Steven" q[:location] ="Burnsley Woods" q[:rewards] = [:exp, 100]
https://www.dropbox.com/sh/lx9kujzm08ue5cn/VBbZ9WqcZq
 
Last edited by a moderator:

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,365
Reaction score
7,675
First Language
German
Primarily Uses
RMMV
and again, that is absolutely useless because you didn't give the ENTIRE game WITH THE ERROR!!!!!.

Because you decided on your own to rename directories and delete some of the other directories, I had to copy and repair the structure before I could even open it.

<snipped>

Please link us with the complete, defective game you want to us to find the error in.

EDIT:

OK, Dark Paladin found the true error - sorry for going berserk in that answer above (if you read it before I edited it) - it's after midnight here and I should go to bed before I continue posting.
 
Last edited by a moderator:

Dark Paladin

Game Designer
Veteran
Joined
Jul 10, 2012
Messages
165
Reaction score
10
First Language
English
Primarily Uses
RMMV
@ Andar He put the scripts inside the wrong folder name Instead of scripts it should be data. Just move them from script to the data folder of a new project.

HERE

Get the script from this demo.

You must add the information in the script not in the event.

You would put this:

reveal_objective(99, 0)

In the events script call box.

SCREENSHOTS





 
Last edited by a moderator:

Matsoman

MatsoKing
Member
Joined
Jul 12, 2013
Messages
14
Reaction score
0
First Language
English
Primarily Uses
Thanks you so much.
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

so hopefully tomorrow i get to go home from the hospital i've been here for 5 days already and it's driving me mad. I miss my family like crazy but at least I get to use my own toiletries and my own clothes. My mom is coming to visit soon i can't wait to see her cause i miss her the most. :kaojoy:
Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD

Forum statistics

Threads
105,868
Messages
1,017,070
Members
137,577
Latest member
SadaSoda
Top