Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM 4.0 Plugin] RadioCommands
Re: [SSGM 4.0 Plugin] RadioCommands [message #470766 is a reply to message #470762] Thu, 05 July 2012 05:52 Go to previous messageGo to previous message
Xpert is currently offline  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.


http://i32.photobucket.com/albums/d42/XpertMaverick/xpertyankee.jpg

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
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [TOOL] chunky
Next Topic: Westwood Scripts [M02]
Goto Forum:
  


Current Time: Mon Nov 25 08:52:05 MST 2024

Total time taken to generate the page: 0.00740 seconds