Retrieve Player Name in function
#1

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.
Reply
#2

I'm not sure, but try text[] and forward.

pawn Код:
forward UnbanPlayer(text[]);

public UnbanPlayer(text[])
{
return 1;
}
Reply
#3

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
Reply
#4

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.
Reply
#5

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).
Reply
#6

Ah, alright.

Glad it's solved. If I face this problem in the future, I know how to fix it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)