Miscellaneous coding questions

Ok, so I’ve recently gotten back in to Lua and was wondering about a couple subjects.

For variables in general, what is the best way to set them and save them. Such as setNwInt, or is there a more efficent way to use them, and for saving should I just use file.write?

Also, could someone link me to a basic structure or tutorial for “Effects”, such as the “Skeleton Gamemode” for a basic Gamemode structure.

Skeleton Gamemode Link: http://www.garrysmod.org/downloads/?a=view&id=39584

If I have any more questions I’ll post them here.