Tunner Posted September 1, 2012 Posted September 1, 2012 So I use this script and I got error: attempt to call global "createWeapon" (a nil value). Changing "weapon =" to "local weapon =" doesnt help, changing m4 to 21 doesnt help either. anyone got a clue? function crtwpn() weapon = createWeapon ( M4, 25.5, 1523.0930908203, 12.705202865601 ) end addCommandHandler ( "weapon", crtwpn) THX
scratcher911 Posted September 1, 2012 Posted September 1, 2012 function crtwpn() weapon = createWeapon ( "M4", 25.5, 1523.0930908203, 12.705202865601 ) end addCommandHandler ( "weapon", crtwpn) and be sure that is client side.
Castillo Posted September 1, 2012 Posted September 1, 2012 1: Make sure your server version is at least: 1.3.0 r4557. 2: Make sure your script is set as client side. 3: The weapon must be set as string, so it's "M4", not M4. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Tunner Posted September 1, 2012 Author Posted September 1, 2012 Thanks for the fast reply. It was clientside alright, but I didnt have the "M4" thing. So I changed it, but it sitll doesnt work. Ive got the latest nightly (the one MTA kept annyoing with when i ran it). In the console it says it is 1.3.0 r4550, so I guess ill need to update to make it work.
Anderl Posted September 1, 2012 Posted September 1, 2012 Show meta.xml. "[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007
Tunner Posted September 1, 2012 Author Posted September 1, 2012 Excellent! Thank you very much guys. I updated to the very newest version of MTA and it worked. Well, I had to add after updating it to the meta to make it start (which is weird) but it works now. Thanks again.
Castillo Posted September 1, 2012 Posted September 1, 2012 You're welcome. San Andreas Utopia RPG (SAUR) Owner & Developer. Education is the most powerful weapon which you can use to change the world.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now