The Dink Network

script crashes my dimod.....i think?

November 19th 2005, 09:43 AM
anon.gif
RANKN67
Ghost They/Them
 
it crashes rite after the man says "good luck" can any one help me?

// ask man for scroll
void main(void)
{
if (&story == 1)
{

freeze(1);

int &man = create_sprite(396, 202, 16, 371, 1);
sp_base_walk(&man, 370);
sp_speed(&man, 1);
freeze(&man);

move_stop(1, 6, 300, 1);
sp_dir(1, 6);

say_stop("Hey, you there! have u seen a scroll?", 1);
wait(200);
say_stop("idiot say wat?", 1);
wait(100);
say_stop("`0 what?", &man);
wait(200);
say_stop("have u seen a scroll?",1);
wait(200);
say_stop("`0yes but get me the meat of the giant duck.", &man);
wait(200);
say_stop("Ok,cool be rite bac.", 1);
wait(200);
say_stop("`0good luck.", &man);
&story = 2;
unfreeze(1);
}
}
November 19th 2005, 09:49 AM
burntree.gif
Striker
Noble She/Her United States
Daniel, there are clowns. 
It may have something to do with that crappy netspeak dialog.

/not serious
November 19th 2005, 09:58 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
Can't find a bug, it probably crashes due to something else.
November 19th 2005, 09:58 AM
anon.gif
RANKN67
Ghost They/Them
 
u know wat?? i dont tolerate stupid posts like that!! lol, jk i love stupid humor
but seriously do u know how to fix it?
November 19th 2005, 10:00 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
No, because there's no bug in this script.. so anything that crashes it, isn't in this thread (so I can't read it )..
November 19th 2005, 10:05 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
I can't see wrong scripting either. Maybe it helps if you separate the colour coding from the rest of the text, so you'd get:

say_stop("`0 good luck.", &man);

Other than that, try commenting out the line (with //) and see if it still crashes.
November 20th 2005, 04:22 AM
dinkdead.gif
millimeter
Peasant He/Him Canada
Millimeter is Wee-Lamm, Recording Artist. :-) 
I am still learning to write dink script but, why did you not unfreeze(&man)?

Perhaps,

void main(void)
{
if(&story == 1)
{
//Your script
unfreeze(1);
}
//unfreeze(1); is not called if(&story != 1)
}

mm.
November 20th 2005, 11:58 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
missing a unfreeze(&man); command shouldn't be the cause of a crash, since that unfreezes the created sprite, not dink. Dink should still be unfreezed even if the man isn't.
November 20th 2005, 12:24 PM
spike.gif
Do you have any loops running? A loop would seem like the most likely reason to crash it.
November 20th 2005, 04:54 PM
anon.gif
RANKN67
Ghost They/Them
 
figured it out.............. it happened to be that i screewed up the MAIN.c script, lol
November 20th 2005, 06:12 PM
dinkdead.gif
millimeter
Peasant He/Him Canada
Millimeter is Wee-Lamm, Recording Artist. :-) 
Could you post the error you fixed?

Some of us may be new and could benefit from your experience.

mm
November 21st 2005, 02:59 AM
wizardb.gif
Cifra
Peasant He/Him
 
OK, my script crashes too...and it's such a little script, that I really don't know why...

void talk( void )

{

freeze(1);
freeze(&current_sprite);

say_stop("`6Hi, Dink!", &currentsprite);
wait(200);

say_stop("Hey, Boris. What's the matter?", 1);
wait(200);

say_stop("`6The town of Wartridge has been raided by knights again, they took all the food.", &currentsprite);
say_stop("`6The knights claimed that Wartridge hasn't been paying taxes", &currentsprite);
wait(200);
say_stop("No way! The king's gone nutts!", 1);
wait(200);
say_stop("`6Can you do something about it? I've heard they're preparing a raid on our town too, so I gotta go hide the stocks.", &current_sprite);
wait(200);
say_stop("Don't worry, I'll think of something!", 1);
unfreeze(1);
unfreeze(&currentsprite);
}

WHAT THE HELL IS WRONG?
November 21st 2005, 03:03 AM
spike.gif
The "can you do something about it" line is propably too long.
November 21st 2005, 03:22 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
&currentsprite won't work
you need to do &current_sprite

And yeah... the Can you do something about it? line is too long probably.
November 21st 2005, 03:27 AM
wizardb.gif
Cifra
Peasant He/Him
 
Oh, yeah...silly me