The Dink Network

Reply to Mkbul's code error thread

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:
 
 
March 13th 2010, 04:10 AM
goblinh.gif
mkbul
Peasant He/Him Greece
TPA~ 
Ok, i decided to make a thread for my code problems.

Here is my #1.

void main( void )
{
	playmidi("ticket.mid");
	sp_speed(&current_sprite, 2);
	sp_base_walk(&current_sprite, 370);
	sp_brain(&current_sprite, 16);
}

void talk( void )
{
	freeze(1);
	freeze(&current_sprite);
	say_stop("Hi there!", 1);
	wait(100);
	
	choice:
	choice_start()

	set_y 240
	set_title_color 10

	title_start()
	What is that you want here?
	title_end()
	if (&story == 4) "I read a note"
	"What are you doing here?"
	"You seem not ok"
	"Forget it"

	choice_end()
	
	if (&result = 1)
	{	
		say_stop("I've found a note on a cavern that opened from the earthquake!", 1);
		wait(100);
		say_stop("`0Oh really?", &current_sprite);
		wait(100);
		say_stop("`0I guess you want something from me now", &current_sprite);
		wait(100);
		say_stop("Yeah...", 1);
		wait(100);
		
		if (&lady_vesti == 2)
		{
				say_stop("`0Go save my wife first, and then tell me!", &current_sprite);
	
		}
		
		if (&lady_vesti > 2)
		{
		say_stop("`0Ok, what do you want?", &current_sprite);
		wait(100);
		say_stop("Im suspecting that Island of Icrotie has a passage to this hell...", 1);
		wait(100);
		say_stop("`0But that turned into Wasteland years ago!", &current_sprite);
		wait(100);
		say_stop("Just send me there!", 1);
		wait(100);
		say_stop("`0Not so fast, bring me some firefist gloves first!", &current_sprite);
		wait(100);
		say_stop("Crap...another adventure", 1);
		unfreeze(1);
		unfreeze(&current_sprite);

		if (&fire_gloves = 0)
		{
			say("`0Get me those gloves!", &current_sprite);
		} 
		else
		{
		say_stop("I got you the gloves!", 1);
		wait(100);
		say_stop("`0Thank you man!", &current_sprite);
		wait(100);
		say_stop("`0Now, let's get to work", &current_sprite);
		wait(100);
		goto warp;

		}

	}
	
	if (&result == 2)
	{
		say_stop("What are you doing here?", 1);
		wait(100);
		say_stop("`0I just wanted to leave from the buzy village above", &current_sprite);
		wait(100);
		say_stop("`0With all those taxes", &current_sprite);
		wait(100);
		say_stop("Yeah, the Giff is very selfish", 1);
		wait(100);
		say_stop("`0Basicly i argued with Mr. Pua", &current_sprite);
		wait(100);
		goto choice;
	}
	if (&result == 3)
	{
		say_stop("You don't seem very well, what's wrong?", 1);
		wait(100);
		say_stop("`0Well, my wife has gone to make some potions", &current_sprite);
		wait(100);
		say_stop("`0And she hasn't returned yet...", &current_sprite);
		wait(100);
		say_stop("I think i know where to go...", 1);
		wait(100);
		say_stop("`0Really? Thank you...eeerm your name?", &current_sprite);
		wait(100);
		say_stop("Dink Smallwood", 1);
		&lady_vesti += 1;
		goto choice;

	}
	if (&result == 4)
	{
		unfreeze(1);
		unfreeze(&current_sprite);
	}
		
		warp:
		
		fade_down();
		&player_map = 5;
		sp_x(1, 145);
		sp_y(1, 90);
		load_screen(5);
		draw_screen();
		fade_up();
		
		
}


The choice works really well, but whichever choice i choose it crashes...can you tell me why?