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

Why does it say "attempt to call a nil value" when I do this?

Hello guys, I have a sad story. I have been working on this for several hours and I cannot seem to find a solution that works. This piece of code doesn't work:

(function () print'josh =' end)()(function () print'noob' end)()

Ignore what the body is in those functions, it doesn't matter because I still get the same error, which is:

[string "(function () print'josh =' end)()(function ..."]:1: attempt to call a nil value

Does anybody know how to fix this? It would really mean the world to me, and many others who share this issue too! Please help...

1 answer

✓ Accepted answer

I have no idea why you would ever want to do this but it seems to be something to do with how lua is parsing the code. To resolve this include ; to specify the end of statment.

Example

(function () print'josh =' end)();(function () print'noob' end)()

hope this helps.

1 comment

0

THANK YOU SO MUCH THANK YOU I LOVE YOU

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