Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM 4.0 Plugin] DDE Channel
Re: [SSGM 4.0 Plugin] DDE Channel [message #473316 is a reply to message #473305] Tue, 21 August 2012 06:31 Go to previous messageGo to previous message
iRANian is currently offline  iRANian
Messages: 4308
Registered: April 2011
Karma:
General (4 Stars)
Console_Output() already accepts formatted input so there's no need to write a Console() wrapper function to add support for this.

This:
bool initvalue;


Should mean that initivalue gets initalized with a random value, the first use of initvalue is:

void DDEChan::Initialize()
{
	if (initvalue == 1) { return; }
	initvalue = 1;

If I remember correctly bool will be initalized with a garbage value which is compared to 1, which is why this works but will break if initvalue is garbage filled with 1. Instead you should set initvalue to false before using it like so:

bool initvalue = false;


see:
http://www.velocityreviews.com/forums/t448719-uninitialized-bool.html
http://cboard.cprogramming.com/c-programming/134960-confused-about-uninitialized -bool-variable.html


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

[Updated on: Tue, 21 August 2012 06:40]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [SSGM 4.0 Plugin] TeamDonate Plugin
Next Topic: Serverside Flood Protection
Goto Forum:
  


Current Time: Wed Nov 06 08:08:18 MST 2024

Total time taken to generate the page: 0.00821 seconds