Tuesday, June 7, 2011

Scripting Help 6/7/11

Dear BCG,
In what context would you use 'end)' with the ')' next to it?
-pie1183

Dear pie1183,
You would do so when creating an anonymous function. An anonymous function is a function with no name. Here is an example:


game.Players.PlayerAdded:connect(function(p)
print(p.Name)
end)


Note that the 'end' ends the function, and the ')' closes the open '(' in the first line.

No comments:

Post a Comment

Write your comment here... OR Flingi will eat you