script crashes my dimod.....i think?
November 19th 2005, 09:43 AM
RANKN67
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);
}
}
// 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);
}
}
It may have something to do with that crappy netspeak dialog.
/not serious
/not serious
Can't find a bug, it probably crashes due to something else.
November 19th 2005, 09:58 AM
RANKN67
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?
but seriously do u know how to fix it?
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 )..
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.
say_stop("`0 good luck.", &man);
Other than that, try commenting out the line (with //) and see if it still crashes.
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.
Perhaps,
void main(void)
{
if(&story == 1)
{
//Your script
unfreeze(1);
}
//unfreeze(1); is not called if(&story != 1)
}
mm.
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.
Do you have any loops running? A loop would seem like the most likely reason to crash it.
November 20th 2005, 04:54 PM
RANKN67
figured it out.............. it happened to be that i screewed up the MAIN.c script, lol
Could you post the error you fixed?
Some of us may be new and could benefit from your experience.
mm
Some of us may be new and could benefit from your experience.
mm
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(¤t_sprite);
say_stop("`6Hi, Dink!", ¤tsprite);
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.", ¤tsprite);
say_stop("`6The knights claimed that Wartridge hasn't been paying taxes", ¤tsprite);
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.", ¤t_sprite);
wait(200);
say_stop("Don't worry, I'll think of something!", 1);
unfreeze(1);
unfreeze(¤tsprite);
}
WHAT THE HELL IS WRONG?
void talk( void )
{
freeze(1);
freeze(¤t_sprite);
say_stop("`6Hi, Dink!", ¤tsprite);
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.", ¤tsprite);
say_stop("`6The knights claimed that Wartridge hasn't been paying taxes", ¤tsprite);
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.", ¤t_sprite);
wait(200);
say_stop("Don't worry, I'll think of something!", 1);
unfreeze(1);
unfreeze(¤tsprite);
}
WHAT THE HELL IS WRONG?
The "can you do something about it" line is propably too long.
¤tsprite won't work
you need to do ¤t_sprite
And yeah... the Can you do something about it? line is too long probably.
you need to do ¤t_sprite
And yeah... the Can you do something about it? line is too long probably.