06.08.2010, 03:06
Hi all 
My script is working almost fine, except I can't figure out how to convert a string array into an integer.
What I'm trying to do is create a command to give a player a weapon + ammo.
Here's the code:
http://pastebin.com/6AuSscwT
When I try passing the parameters to the GivePlayerWeapon function, it returns an error stating there's an argument type mismatch.
I suppose that's cause I'm trying to give it strings instead of integers...
For simplicity of the uploaded script, I just made a statement to display the variables in the console window, to prove that the variables are being passed, and they are. (As string, unfortunately)
If anyone could show me how to convert/format or show a better way to do this, that'd be awesome
TIA
This'd be so much easier if I could just get variables down :P

My script is working almost fine, except I can't figure out how to convert a string array into an integer.
What I'm trying to do is create a command to give a player a weapon + ammo.
Here's the code:
http://pastebin.com/6AuSscwT
When I try passing the parameters to the GivePlayerWeapon function, it returns an error stating there's an argument type mismatch.
I suppose that's cause I'm trying to give it strings instead of integers...
For simplicity of the uploaded script, I just made a statement to display the variables in the console window, to prove that the variables are being passed, and they are. (As string, unfortunately)
If anyone could show me how to convert/format or show a better way to do this, that'd be awesome

This'd be so much easier if I could just get variables down :P