Hey everyone, I have a pretty simple question for you all. I’m confused on whether certain functions send parameters or recieve parameters, and I’m having trouble differentiating between the two. For example:
local localVariable = 5
TriggerClientEvent("clientEvent", localVariable) -- obviously, in this case, localVariable is sent to the client script.
AddEventHandler("clientEvent", function(localVariable)) -- and localVariable is received here, right?
My question is, how am I supposed to know if a function is sending or recieving a variable? This case in particular doesn’t do my question justice as it’s pretty simple, but in other cases, my question applies.
And does it matter what the the variable name in the function that is recieving it is? For example:
AddEventHandler("clientEvent", function(notNamedLocalVariable)) -- will this take the value of localVaraible?
I know this isn’t a question regarding FiveM in particular, and is more of a simple programming question, but I was hoping someone may be able to explain this to me. Thanks!