The Dink Network

Reply to Re: Script interference

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:
 
 
July 25th 2018, 09:27 AM
spike.gif
SlipDink
Peasant He/Him United States bloop rumble
2nd generation. No easy way to be free. 
DinkC is generally pretty picky about the use of ONE space around each side of any of it's operators. I don't know whether or not this is the root of your problems, but I can tell you that this:

if(&help_var ==3)
should be
if (&help_var == 3)
and this
if(&help_var ==2)
should be
if (&help_var == 2)
.

You don't actually need the space after if, but you DO need exactly one space on each side of the == sign. Don't believe me? COPY EXACTLY this short piece of code as key-68.c and get Dink to a blank "New Screen". Then press the letter D (for Dink of course!) on your keyboard.

void main( void )
{
	script_attach(1000);
	freeze(1);
	if(1 == 0)
		say_stop("if(1 == 0) with spaces around numbers FAILS",1);
	else
		say_stop("if(1 == 0) with spaces around numbers works correctly",1);
	if (1 == 0)
		say_stop("if (1 == 0) with spaces around numbers and after if FAILS",1);
	else
		say_stop("if (1 == 0) with spaces around numbers and after if works correctly",1);
	if(1==0)
		say_stop("if(1==0) with no spaces around numbers FAILS",1);
	unfreeze(1);
	kill_this_task();
}