General > Developers Corner
Nil
roastchicken:
You're not returning anything in that function. What is nil?
dankpepe:
The ply_name and the rank variable are nil.
Bytewave:
You're setting the variables when should_revoke is false, but working with them when should_revoke is true. They're nil because you don't give them a value when you work with them, but do give them a value when you don't work with them.
iViscosity:
Instead of doing "local <variable> = <target>", instead just do "<variable> = <target>". To clarify what they meant, if you don't get it, is you're defining your two variables only when in the "if not should_revoke" which means you can't use them in the "if should_revoke" (else) as they aren't set to anything anymore and return nil.
Also, it may help if you do "elseif should_revoke" so that everything stays in one. Even though you are defining the ply_name and rank in the function, you're not setting them to anything.
dankpepe:
Thank you so much, getting rid of local fixed it. Do you know if there is anyway I can give a certain user all the permissions from a group?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version