-
Notifications
You must be signed in to change notification settings - Fork 7
Returning self
Nak edited this page Sep 19, 2022
·
3 revisions
Functions returning self is a method known as method chaining. A common syntax that allow you to chain functions together in a single statement, without requiring any variables to store the output.
An example is how you can chain the BitBuffer's write functions:
local buffer = NikNaks.BitBuffer():WriteFloat(1234):WriteLong(1234):WriteSnort(2):Seek(0)
The script above will create a bitbuffer and write a float, long and snort variables and then reset the pointer to 0.
- BitBuffer
- BSP Parser
- DateTime and Date-Functions
- TimeDelta
-
PathFinding (Coming soon)
- LPathFollower (Coming soon)
- NodeGraph (Coming soon)
- NikNav ( NikNaks Navigation ) on ToDo
- Extended functions (Coming soon)