error 035: argument type mismatch (argument 1)
Hi.
Can not beat that error PHP Code:
Guide me please what's wrong... PHP Code:
|
Re: error 035: argument type mismatch (argument 1)
You are checking strlen of an integer, it expects a string (array). And "#" + i just makes no sense.
|
Re: error 035: argument type mismatch (argument 1)
Quote:
|
Re: error 035: argument type mismatch (argument 1)
What exactly is this code supposed to do? Give me what is inputted and what you expect it to do.
|
Re: error 035: argument type mismatch (argument 1)
Quote:
Example command: amx_internalbancommand #31 Where #31 is an index of a player in game. Found how to convert, but does not work...ooh. PHP Code:
|
Re: error 035: argument type mismatch (argument 1)
A string is an array. Len is not an array
|
Re: error 035: argument type mismatch (argument 1)
I don't see what your loop is even doing. It's looping from 0 to 31 (when it should be 1 to 32 if its an actual player id, and #1-#XXX if it's a userid) and stopping when the arg matches the loop index value. Why don't you just skip this part? Maybe use cmd_target() instead to validate it hit a valid, and acceptable, player index.
|
Re: error 035: argument type mismatch (argument 1)
Quote:
Why don't you try something like this. It accepts all or part of the users name, or the userid number (#12). - amx_internalbancommand bugs - amx_internalbancommand #12 PHP Code:
#define CMDTARGET_OBEY_IMMUNITY (1<<0) #define CMDTARGET_ALLOW_SELF (1<<1) #define CMDTARGET_ONLY_ALIVE (1<<2) #define CMDTARGET_NO_BOTS (1<<3) To use multiple, use bit-wise OR CMDTARGET_NO_BOTS | CMDTARGET_OBEY_IMMUNITY |
Re: error 035: argument type mismatch (argument 1)
Quote:
I did not consider to use cmd_target because i can not find full documentation on it (i even did not know that function before you told me about it). I am not sure what exactly does it do, what for does here the first argument and what does it mean. PHP Code:
|
Re: error 035: argument type mismatch (argument 1)
Ok, I wasn't sure what you were doing but it looks like you figured it out. The first arg (id) is the player who used the command.
|
| All times are GMT -4. The time now is 15:24. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.