Retrieve Player Name in function - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Retrieve Player Name in function (
/showthread.php?tid=230847)
Retrieve Player Name in function -
Mike Garber - 24.02.2011
Well my function starts with this;
pawn Код:
UnbanPlayer(playername[])
{
And you call it with UnbanPlayer(playername); , but It doesn't store in It. (When the playername string is used It returns "я").
I already try setting an array size (playername[MAX_PLAYER_NAME]), it compiles but doesn't work.
Thanks in advance for any help.
Re: Retrieve Player Name in function -
Biesmen - 24.02.2011
I'm not sure, but try text[] and forward.
pawn Код:
forward UnbanPlayer(text[]);
public UnbanPlayer(text[])
{
return 1;
}
Re: Retrieve Player Name in function -
iMonk3y - 24.02.2011
Are you using dudb by any chance? I'm not sure, but I would assume that the 'я' bug is somehow related to dudb.. Why I assume so?
My experience
Re: Retrieve Player Name in function -
Mike Garber - 24.02.2011
Quote:
Originally Posted by iMonk3y
Are you using dudb by any chance? I'm not sure, but I would assume that the 'я' bug is somehow related to dudb.. Why I assume so? My experience 
|
Nope I'm not, and biesmen i'm gonna try it.
Re: Retrieve Player Name in function -
Mike Garber - 24.02.2011
I figured out what the problem was.
I use sscanf2 and i used the wrong parameter character ® which is for playername. But this is used for offline players (obviously) so I had to use 's' (as in string) instead. (In the unban command).
Re: Retrieve Player Name in function -
Biesmen - 24.02.2011
Ah, alright.
Glad it's solved. If I face this problem in the future, I know how to fix it