read_arv issue
So im trying to create a command amx_friendlyfire to change the value of mp_friendlyfire
PHP Code:
****face-palm****** arg[2] HAHAHAHAHA Look don't laugh at me......... I'm tired... |
Re: read_arv issue
if you convert "0.25" or "123131.1232131" to an integer, it will return 0
|
Re: read_arv issue
Quote:
|
Re: read_arv issue
Quote:
for my purpose i needed it arg[4] |
Re: read_arv issue
I'm confused. Is there still an issue here? If yes, debug with read_args().
|
Re: read_arv issue
No, it doesn't seem so. But why you would want to be putting anything other than a 1 or 0 into that command is beyond me.
|
Re: read_arv issue
new arg[2];
This is your problem. Remember, the number of characters you can store in a null-terminated string is size-1 meaning you only allocated enough room for 1 number. Increase your string size large enough to store your max possible value + 1, ie. 123.456 would require a string sized to 8. Also, always use charsmax() when working with strings, not sizeof(). Edit: Quote:
|
Re: read_arv issue
I realized it before in my first post. Read the facepalm lol... and at the guy go into approved plugin and view my variable friendly fire. That's what this was for.
|
| All times are GMT -4. The time now is 03:27. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.