Lua – “‘}’ is expected to have an error near ‘=’, otherwise it looks perfect

When I try to run my script, I return an error when assigning a value to the variable. I have rechecked my grammar many times and this does not seem to be the mistake I made there-I even There are others who have looked at it just in case. However, the continuously returned errors point to my grammar, and I can’t seem to find a solution to this problem.

This is the whole troublesome function:

function registerquestlines()
if player["testline"] == nil then
player["testline"] = {"prog" = { true,false,false}, "quests" = {"testline1", "testline2", "testline3"}, "prog#" = 1}
end
end

Same , The error I get is:’}’ is expected near’=’ on the line where I specify the value for the player [“testline”].

Table initializers use unquoted names or bracket expressions instead of quoted names.

{prog = {true,false,false}}
{["prog"] = {true,false,false}}

When I try to run When I have a script, I return an error when assigning a variable. I have rechecked my syntax many times, and this does not seem to be the mistake I made there-I even have other people looking at it just in case. But, continuous The error returned points to my grammar, and I can’t seem to find a solution to this problem.

This is the whole troublesome function:

function registerquestlines()
if player["testline"] == nil then
player["testline"] = {"prog" = {true,false,false}, "quests" = {"testline1" , "testline2", "testline3"}, "prog#" = 1}
end
end

Similarly, the error I get is:’}’ when I specify for the player [“testline”] Expected near’=’ on the value line.

Use unquoted names or bracket expressions for table initializers instead of quoted ones Name.

{prog = {true,false,false}}
{["prog"] = {true,false,false}}< /pre>

Leave a Comment

Your email address will not be published.