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

"unexpected symbol" fix?

I recently got the errors

22:28:20.703 - Workspace.TrelloAPI:553: unexpected symbol near '='

and

22:28:20.790 - Requested module experienced an error while loading
22:28:20.791 - Script 'Players.Player.PlayerGui.Application.Frame.create.Script', Line 4
22:28:20.792 - Stack End

From the lines

552 - 560:

elseif #args==4 then
			local nam,des="",lid,url=args[1],args[2],args[3],args[4]
			dat={
			name=nam,
			desc=""..des,
			idList=lid,
			urlSource=url,
			due=nil
			}

and

4:

local ap = require(game.Workspace.TrelloAPI)

3 comments

0

The second varaible on the definition line, des, is followed by [ ="" ] and then you attempt to continue to define more variables. (dismiss the square brackets, it is only to make the signs more clear)

0

So, remove the [""] and it should work?

0

And the equal sign, yes. Or atleast that is the source of the error you are encountering.

1 answer

✓ Accepted answer

Eep, that's not how you do an assignment.

local nam,des="",lid,url=args[1],args[2],args[3],args[4]

Certainly not correct. If you wanted des to default back to "" if args[2] is nil, you could do an inline nil check with short circuit logic.

local nam,des,lid,url=args[1],args[2] or "",args[3],args[4]

More information:

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