New name not changing - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: New name not changing (
/showthread.php?tid=575782)
New name not changing -
hhaaoo123 - 30.05.2015
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);
|
Re: New name not changing -
BroZeus - 30.05.2015
try this:
PHP код:
format(PlayerInfo[giveplayerid][pRankName], sizeof(rankname), "%s", rankname);
Re: New name not changing -
hhaaoo123 - 30.05.2015
Not working...
Re: New name not changing -
Konstantinos - 30.05.2015
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);
Re: New name not changing -
hhaaoo123 - 30.05.2015
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...
Re: New name not changing -
Konstantinos - 30.05.2015
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.
|
Re: New name not changing -
hhaaoo123 - 30.05.2015
Fixed, Thanks