What i mean is you can't add variables to context and make them available to function.
SetUserData is just to associate it some of your own c++ object, just a convenience method.
If you have one module per script file than you should use globals. They are belong to module they are created.
If not use script classes, your c++ class owns a asIScriptObject then you can operate on that.