The Dink Network

Reply to Re: Dink Smallwood HD for Windows beta available to try

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
September 5th 2010, 04:44 AM
dinkdead.gif
You can't get the real time or date...
get_time_real, get_date_day etc all just return 0.

Still bad if "if"s are one one line, and it can affect the next line(s) as well.
This works fine (Dink says 1, 3, and when you talk again he says 2, 3) :
//temp is set to 1 in main
void talk (void)
{
	if (&temp == 1)
		say_stop("1", 1);
	if (&temp == 2)
	{
		say_stop("2", 1);
	}
	say_stop("3", 1);
	&temp = 2;
}

But here Dink says 2, 3 every time, even when &temp == 1!
In this case it ignores what follows the if on the same line and treats the line below as if it is part of it.
void talk (void)
{
	if (&temp == 1) say_stop("1", 1);
	if (&temp == 2)
	{
		say_stop("2", 1);
	}
	say_stop("3", 1);
	&temp = 2;
}

Because doing this
if (&temp == 1) say_stop("1", 1);
say_stop("banana", 1);
if (&temp == 2)
//etc

means that Dink only says 3 the first time, skipping banana (wrongly) and 2 (correctly). Sorry for the long-winded explanation