server-beta
server-beta copied to clipboard
[BEHAVIOR DIFFERENCE]: PawnPlus' AmxString and AmxStringBuffer
Description
In SA:MP server, everything works as intended. PawnPlus' string is shown as how it should be. However, in open.mp, everything turns into random symbols that I don't even know what symbols are those.
How to re-produce this behavior difference
native SendClientMessageStr(playerid, color, ConstAmxString:string) = SendClientMessage;
native GetPlayerNameStrImpl(playerid, AmxStringBuffer:name, len) = GetPlayerName;
stock String:GetPlayerNameStr(playerid)
{
new String:str = str_new_buf(MAX_PLAYER_NAME);
str_resize(str, GetPlayerNameStrImpl(playerid, str, MAX_PLAYER_NAME));
return str;
}
public OnPlayerConnect(playerid)
{
new String:str = str_format("Welcome, %S.", GetPlayerNameStr(playerid));
SendClientMessageStr(playerid, -1, str);
print_s(str);
return 1;
}
Relevant log output
SA:MP Server
Client: Welcome, Hreesang.
Console: Welcome, Hreesang.
open.mp
Client: Ûã0
Console: [Info] Welcome,
open.mp server version
Build 10
Operating system or distribution
Windows 8.1 & Windows 10
Contact information
Hreesang#0614
Additional information
