Re: [SSGM 4.0 Plugin] RadioCommands [message #470766 is a reply to message #470762] |
Thu, 05 July 2012 05:52 |
|
Xpert
Messages: 1588 Registered: December 2005 Location: New York City
Karma:
|
General (1 Star) |
|
|
Whitedragon wrote on Thu, 05 July 2012 04:40 | You're leaking memory. You could rewrite the entire thing as simply:
Console_Output("[Radio] %ls: %ls\n",Get_Wide_Player_Name_By_ID(PlayerID),TranslateDBClass::Get_String(AnnouncementID));
|
If I remember correctly, Get_Wide_Player_Name_By_ID doesn't exist in SSGM 4.0, or am I not seeing it?
iRANian wrote on Thu, 05 July 2012 05:18 | You're right, should use Get_Wide_Player_Name() or Find_Player(PlayerID)->PlayerName, and change the '%s' to a '%S' in the format string.
|
I don't know why but in my private code, I did use Get_Wide_Player_Name() instead of Get_Player_Name_By_ID.
Updated 1st post with v2.
Creator of NetGuard, an IRC network regulator.
Developer of the CloudyServ 0.982-X project.
Developer of the CloudyServ Ren-X bot.
Part time streamer - https://twitch.tv/gg_wonder
|
|
|