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

Any alternatives to Functions? [closed]

Asked by 9 years ago

Most of my script's errors are caused by needing an end at the end of the code due to a function in the script. Is there any alternatives to functions so I don't need to put ends?

0
ROBLOX usually adds ends for you if needed, but you should be able to know to check just in-case. Anyway, no. ends are the only way ROBLOX knows to stop something. alphawolvess 1784 — 9y
0
If you tabbed your code properly, this would never be an issue. BlueTaslem 18071 — 9y

Closed as Not Constructive by BlueTaslem

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
M39a9am3R 3210 Moderation Voter Community Moderator
9 years ago

Not really... No. Ends are needed to close a function, loop, or if then statement.

They are not avoidable. I would recommend however, if you start a function, to place a end right after it. If the settings are at factory default in ROBLOX studio, it should automatically end a function for you when you hit enter.

If you're having problems with your scripts not having enough ends then you're probably going wrong somewhere, and should try rewriting your script.

Sorry if this answer didn't help but I do not believe ends are avoidable.

Ad