New name not changing
#1

I am trying to save the rank name but it's not saving at all

Quote:

new string[128], giveplayerid, rankname[30];
if(sscanf(params, "us[30]", giveplayerid, rankname))
return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setfacmembername [playerid/partofname] [Rank Name]");

Quote:

format(PlayerInfo[giveplayerid][pRankName], giveplayerid, rankname);

Reply
#2

try this:
PHP код:
format(PlayerInfo[giveplayerid][pRankName], sizeof(rankname), "%s"rankname); 
Reply
#3

Not working...
Reply
#4

pRankName must be a string in your enum with size of 30.

As for the format is slow, use strcat instead:
pawn Код:
strcat((PlayerInfo[giveplayerid][pRankName][0] = EOS, PlayerInfo[giveplayerid][pRankName]), rankname, 30);
Reply
#5

error 001: expected token: ")", but found "["
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero

Now I get all these error...
Reply
#6

Quote:
Originally Posted by hhaaoo123
Посмотреть сообщение
error 001: expected token: ")", but found "["
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero

Now I get all these error...
Did you completely ignore what I wrote and you rushed to paste the code and try? I have already mentioned:

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
pRankName must be a string in your enum with size of 30.
Reply
#7

Fixed, Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)