• attempt to call method 'Clip1' (a nil value)
    4 replies, posted
Need help, was following a tutorial and did exactly what he typed but I get this error in the console and I dont spawn with anything when I should, any help?
client:GetActiveWeapon() :Clip1() client:GetActiveWeapon () :GetPrimaryAmmoType () client:GetActiveWeapon() :GetPrimaryAmmoType() Don't put spaces.
Good practice, but it doesn't matter for code execution (white spaces are ignored outside of literals). The error occurs when you don't have a weapon equipped and call Player/GetActiveWeapon. You should use IsValid to check if a valid weapon is being held first.
actually did not know that. i guess its still a good practice though. My brain instictly would freak with all those spaces
Cache GetActiveWeapon, so the code is more tidy. Check with IsValid if the weapon is valid. Be careful with C++ weapons. They may not support a number of functions or variables, which are working on lua weapons.
Sorry, you need to Log In to post a reply to this thread.