Argument type mismatch
#1

format(str,128,"[%d] %s ha reportato %s [%d]. Motivo: '%s'",report1reportante,GetPlayerNameEx(report1rep ortante),GetPlayerNameEx(report1reportato),report1 reportato,report1desc);

error 035: argument type mismatch (argument 1)

What's the problem?
Reply
#2

The third argument should be the size of the string.
Reply
#3

Quote:
Originally Posted by Jochemd
Посмотреть сообщение
The third argument should be the size of the string.
The second one is the size, isn't it?
Reply
#4

Show the declaration ('new') for 'str'. You should also use sizeof() so if you change the string's array size, you won't have to change it in format() also. Also, SendClientMessage is limited to 144 characters, not 128. 128 is chat input. A lot of people don't know this.

EDIT: The problem looks like it's with GetPlayerNameEx.
Reply
#5

Look your first GetPlayerNameEx. Not sure if you got it also in the script like that but that may be causing it?
Reply
#6

Quote:
Originally Posted by MP2
Посмотреть сообщение
Show the declaration ('new') for 'str'. You should also use sizeof() so if you change the string's array size, you won't have to change it in format() also. Also, SendClientMessage is limited to 144 characters, not 128. 128 is chat input. A lot of people don't know this.
new str[256];

Quote:
Originally Posted by Jochemd
Посмотреть сообщение
Look your first GetPlayerNameEx. Not sure if you got it also in the script like that but that may be causing it?
well, it's right I believe, this is not the first time I use it and it has always worked.
"player1reportato" is an ID.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)