The Dink Network

Reply to Re: Please help I am so stuck

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:
 
 
December 20th 2004, 07:09 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
In any case, there are crappy brackets again. Here it comes:

void main(void)
{
//This one was good, since it's for opening the main proc
int &dinkd;
int &newy;
int &myy = sp_y(¤t_sprite,-1);

int &hold = sp_editor_num(¤t_sprite);
&newy = editor_seq(&hold,-1);

//Next line: If &newy what? You must add a condition.
if (&newy)
{
//Bracket okay
sp_y(¤t_sprite,&newy);
draw_hard_map();
}
//Bracket again okay

{
//What are these for? I think you can kill it, if it's meant as an else, you must put "else" after the previous bracket and before this one.
sp_speed(¤t_sprite,2);
}
//Same story here

//Huh? The main proc isn't closed... You must add a bracket here:

}

void push(void)
{
//Yay, opening the push proc
&dinkd = sp_dir(1,-1);
&newy = sp_y(¤t_sprite,-1);

if (&newy != &myy) goto nopush;
//I'm not exactly sure if you can use if in this way. To be sure it works, you must put goto nopush; on a new line with opening brackets on the line before, and closing brackets on the line after.

if (&level >= 10)
{
//Brackets okay
unfreeze(1);
//I think you meant freeze(1);
&newy -= 50;
move_stop(¤t_sprite,8,&newy,1);
editor_seq(&hold,&newy);
draw_hard_map();
unfreeze(1);
return;
}
//Yay, closing the if-statement

nopush:
say("I can't push it this way! I am not strong enough yet.", 1);

//And here we're closing the push proc
}

Another question. Why did you create the &dinkd? It's only set to Dinks direction, but it's never checked, nor otherwise used.