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

What does "Expected identifier, got _" mean?

Self-explanatory question. I keep finding it whenever I try to make a function. What does it mean?

1 comment

0

Can you please provide the code?

1 answer

The reason you received the "got _", is because you typed the wrong symbol, in most case. an example is

f = Instance.new("Part",game.Workspace)
f.Anchored = true
f.Position = Vector3.new(1,1,1)
f_Remove()--- as we see here we got _ yet, it should be  f:Remove()

As we see here, this is a way to create a function.

--Creating a function
--unlike many programming languages which requires to call the function, rblx.lua oddly does not, or at 
----least not seen.
function name(anything)
for i, 1,2 do
print("hello world")
end
print("hello world prints twice")
 -- this is the basic feature of functions in roblox

1 comment

0

Call the function, as in?

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