Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » weird reaction with const w_chart
Re: weird reaction with const w_chart [message #464063 is a reply to message #464060] Fri, 09 March 2012 06:53 Go to previous messageGo to previous message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma:
General (4 Stars)
You're using %s with a wchar_t in formatted functions, you need to use %S. Casting a char to wchar_t (if it works) can cause memory corruption. Instead of using wchar_t, use StringClass. Instead of using Console_Input, use a wrapper function that takes formated input like Console_Output() does. This is how I would write the code:

Toggle Spoiler


Not sure if it actually runs correctly though, didn't bother checking. You can also use the __FUNCTION__ and __LINE__ macros to grab the function the code is executing and the line number while debugging.


Long time and well respected Renegade community member, programmer, modder and tester.

Scripts 4.0 private beta tester since May 2011.

My Renegade server plugins releases
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: need some help whit hud text
Next Topic: C&C_Nodewar :: WIP
Goto Forum:
  


Current Time: Wed Dec 18 17:29:21 MST 2024

Total time taken to generate the page: 0.02082 seconds