Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does this line give me an error?

Asked by 9 years ago

The line:

local cred= {bin.Blade.BrickColor = BrickColor.new("Really red")
--- the end of the table is a multilined one, so it ends lower down the script

gives me the error "Expected a name, got a complex expression." Why is this?

1 answer

Log in to vote
0
Answered by 9 years ago
local cred = bin.Blade
cred.BrickColor = BrickColor.new("Really red")

You were assigning a userdata to a value within a table.

0
Thanks, in the end I just changed everything in my script so I didn't have to mess about with tables, but thanks anyways :) jamesbiggsbot 0 — 9y
Ad

Answer this question