Error 035: argument type mismatch (argument 1)
#1

new NewName [MAX_PLAYERS] [128];

new query[150];
mysql_format(g_Sql, query, sizeof(query), "UPDATE `users` SET `username` = '%e' WHERE `username` = '%e' LIMIT 1", NewName[giveplayerid], PlayerName(giveplayer));// ERROR HERE
mysql_query(g_Sql, query);

format(string, sizeof(string), "%s.ini", PlayerName(giveplayer));//THE SAME ERROR HERE TOO
Reply
#2

MAX_PLAYER_NAME, not MAX_PLAYERS, and whats [128] for?
Reply
#3

i have rp server and if someone have non rp name he get dialog and after he write new name it get stored then admins have to accept/deny the name
Reply
#4

PHP код:
NewName[30// 30 is more than enough for a name 
Reply
#5

but i need [MAX_PLAYERS] like : new NewName [MAX_PLAYERS] [30]; bec new NewName [30]; just can store one name
Reply
#6

Quote:
Originally Posted by iLearner
Посмотреть сообщение
MAX_PLAYER_NAME, not MAX_PLAYERS, and whats [128] for?
iLearner said all you need to use.
MAX_PLAYERS is the define for how many can join your server.

PHP код:
EX#define MAX_PLAYERS 50. 
You must use what iLearner said..
PHP код:
NewNameMAX_PLAYER_NAME ]; 
Also if u want to let admins now if the player can change his name
you must create a function like: "ShowMessageToAdmins" or something,
that will show to all admins that dialog and they will be able to accept or decline that newname request.
And if a admin already accepted to show an ERROR, to the others admins if they press "ACCEPT"
that one of the admins has already accepted the newname request.

Use something like this in your function:
PHP код:
foreach(new iPlayer)
            if( 
PlayerInfo][ Level ] >= 
- for admins.

ALSO in my opinion the request that will be showed to admins it's not a good ideea.
Buddy if a player want to change his name, let him change his name without any ACCEPT from admins
use a system in your DB that stores all player names, if u don't have aka. Or create command AKA
and you'll show all the names of that player.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)