Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why is it expecting a } when it's already closed?

I am using a module script to allow the NPCs and player to interact. Upon running my script, I get an error stating:

"22:24:05.998 - ReplicatedStorage.QuestLibraries.Dialogs:6: '}' expected (to close '{' at line 4) near '[' "

The code is:

local module = {}

module.dialog = {
	["QUEST01"] = {
		["NPC1"] = "Hey buddy... I need your help."				
		["RES1"] = "What is it?"
		["NPC2"] = "I need you to go kill some rocks."
		["RES2"] = "Sure.. I'll go kill.... wait... you said rocks?"
		["NPC3"] = "Yeah. I need you to kill rocks."
		["RES3"] = "You can't kill a rock if it's not even living. But sure, consider it done."
		["EXIT"] = "I'm not helping you, loser."	
		}	
}

return module


1 answer

✓ Accepted answer
module.dialog = {
    ["QUEST01"] = {
        ["NPC1"] = "Hey buddy... I need your help.";        
        ["RES1"] = "What is it?";
        ["NPC2"] = "I need you to go kill some rocks.";
        ["RES2"] = "Sure.. I'll go kill.... wait... you said rocks?";
        ["NPC3"] = "Yeah. I need you to kill rocks.";
        ["RES3"] = "You can't kill a rock if it's not even living. But sure, consider it done.";
        ["EXIT"] = "I'm not helping you, loser."    
        }   
}

Fixed this for you remember to use ; to end lines in Dictionaries

This discussion is preserved as it was. New answers, comments, and votes are closed.