AHHHHH! sorry.
this is so frustrating, i know im probably missing something odvious, but this script keeps making the game quit to windows, ive been studying this script for hours but i cant see anything wrong with it. if some experienced dinker could kindly scan this script to see if anythings wrong with it it would be greatly appreteated
void main (void)
{
{
if (&intro == 0)
}
freeze(1);
freeze(¤t_sprite);
say_Stop("`7", ¤t_sprite);
say_Stop("", 1);
say_Stop("`7", ¤t_sprite);
say_Stop("", 1);
say_Stop("`7", ¤t_sprite);
say_Stop("`7", ¤t_sprite);
say_Stop("", 1);
say_Stop("`7", ¤t_sprite);
say_Stop("`7", ¤t_sprite);
say_Stop("", 1);
say_Stop("`7", ¤t_sprite);
say_Stop("`7", ¤t_sprite);
say_Stop("crashes after this is said", 1);
say_Stop("`7", ¤t_sprite);
say_stop("", 1);
say_Stop("`7", ¤t_sprite);
say_Stop("`7", ¤t_sprite);
say_Stop("`7", ¤t_sprite);
say_Stop("`7", ¤t_sprite);
say_Stop("`7", ¤t_sprite);
say_Stop("`7", ¤t_sprite);
unfreeze(1);
unfreeze(¤t_sprite);
&intro = 1;
}
void main (void)
{
{
if (&intro == 0)
}
freeze(1);
freeze(¤t_sprite);
say_Stop("`7", ¤t_sprite);
say_Stop("", 1);
say_Stop("`7", ¤t_sprite);
say_Stop("", 1);
say_Stop("`7", ¤t_sprite);
say_Stop("`7", ¤t_sprite);
say_Stop("", 1);
say_Stop("`7", ¤t_sprite);
say_Stop("`7", ¤t_sprite);
say_Stop("", 1);
say_Stop("`7", ¤t_sprite);
say_Stop("`7", ¤t_sprite);
say_Stop("crashes after this is said", 1);
say_Stop("`7", ¤t_sprite);
say_stop("", 1);
say_Stop("`7", ¤t_sprite);
say_Stop("`7", ¤t_sprite);
say_Stop("`7", ¤t_sprite);
say_Stop("`7", ¤t_sprite);
say_Stop("`7", ¤t_sprite);
say_Stop("`7", ¤t_sprite);
unfreeze(1);
unfreeze(¤t_sprite);
&intro = 1;
}
You made some serious bracket-mess here, pal, so let's check it out.
void main( void )
{
//this bracket means the beginning of the main procedure
if (&intro == 0)
{
//Anything after this bracket, and before the next is executed only if &intro equals 0
//do your freeze and say stuff here
&intro = 1;
}
//If statement ends here
}
//Main procedure ends here
}
This is the correct code. I don't know why it would crash in the say_stop(); code, because I don't see any errors in that. I usually type say_stop all in lowercase, but I don't think DinkC is case sensitive, since it didn't crash before.
void main( void )
{
//this bracket means the beginning of the main procedure
if (&intro == 0)
{
//Anything after this bracket, and before the next is executed only if &intro equals 0
//do your freeze and say stuff here
&intro = 1;
}
//If statement ends here
}
//Main procedure ends here
}
This is the correct code. I don't know why it would crash in the say_stop(); code, because I don't see any errors in that. I usually type say_stop all in lowercase, but I don't think DinkC is case sensitive, since it didn't crash before.
ummmm, what do you mean by if satement ends here.
it would explain a lot if it was some command you had to do every time you used the if statement. thanks.
it would explain a lot if it was some command you had to do every time you used the if statement. thanks.
If statements work like this:
void main( void )
{
if (&monkey == 1)
{
say_stop("Yeah, monkey dude!!",1);
}
say_stop("MONKEY!!",1);
}
In this case if &monkey equals 1, Dink would say "Yeah, monkey dude!!" and directly after that he'll say "MONKEY!!".
Now with "if statement ends here" I meant that everything after that one bracket is executed, even if &intro wasn't 0. So basically, that bracket was the end of your if-statement.
I hope it's a bit more clear now, and good luck on your D-Mod!
void main( void )
{
if (&monkey == 1)
{
say_stop("Yeah, monkey dude!!",1);
}
say_stop("MONKEY!!",1);
}
In this case if &monkey equals 1, Dink would say "Yeah, monkey dude!!" and directly after that he'll say "MONKEY!!".
Now with "if statement ends here" I meant that everything after that one bracket is executed, even if &intro wasn't 0. So basically, that bracket was the end of your if-statement.
I hope it's a bit more clear now, and good luck on your D-Mod!
well, that was aa bout of stupidness... but anyway, even if i fix the bracket errors, it still quits to windows. if you can think of any reason that might be causing this please let me know, heres thecode after i fixed the brackets (it freezes when dink says world).
void main (void)
{
if (&intro == 0)
{
freeze(1);
freeze(¤t_sprite);
say_stop("`7ahhh dink, there you are.", ¤t_sprite);
say_stop("you wanted me king daniel?", 1);
say_stop("`7yes dink, i need you to do me a favour", ¤t_sprite);
say_stop("Again?", 1);
say_stop("`7yes dink, i need you again.", ¤t_sprite);
say_stop("`7i need you to find me a scroll that belongs to an evil which.", ¤t_sprite);
say_stop("evil?", 1);
say_stop("`7yes dink, evil.", ¤t_sprite);
say_stop("`7its a higly powerful scroll called the saragotta scroll", ¤t_sprite);
say_stop("powerfull?", 1);
say_stop("`7yes Dink, powerfull", ¤t_sprite);
say_stop("`7its so powerfull, if used correctly, it could destroy the world.", ¤t_sprite);
say_stop("world?", 1);
say_stop("`7yes Dink, the world... now shut up, stop taking my moment, i only have about 1 miniute in this entire dmod!", ¤t_sprite);
say_stop("well you better stop wasting time!", 1);
say_stop("`7please dink", ¤t_sprite);
say_stop("`7the witch who posseses it is called Bertha Haggiswood, i understand that she was your neighbour when you were younger.", ¤t_sprite);
say_stop("`7the witches cottage lies beyond the frozen forest, thats all we know.", ¤t_sprite);
say_stop("`7if you go north to a town called brimana you can then go east to the frozen forest", ¤t_sprite);
say_stop("`7but im afraid you'll need to find your own way to her cottage.", ¤t_sprite);
say_stop("`7good luck dink", ¤t_sprite);
unfreeze(1);
unfreeze(¤t_sprite);
&intro = 1;
}
}
thanks.
edit: i dont know why ¤t_Sprite shows up funny
void main (void)
{
if (&intro == 0)
{
freeze(1);
freeze(¤t_sprite);
say_stop("`7ahhh dink, there you are.", ¤t_sprite);
say_stop("you wanted me king daniel?", 1);
say_stop("`7yes dink, i need you to do me a favour", ¤t_sprite);
say_stop("Again?", 1);
say_stop("`7yes dink, i need you again.", ¤t_sprite);
say_stop("`7i need you to find me a scroll that belongs to an evil which.", ¤t_sprite);
say_stop("evil?", 1);
say_stop("`7yes dink, evil.", ¤t_sprite);
say_stop("`7its a higly powerful scroll called the saragotta scroll", ¤t_sprite);
say_stop("powerfull?", 1);
say_stop("`7yes Dink, powerfull", ¤t_sprite);
say_stop("`7its so powerfull, if used correctly, it could destroy the world.", ¤t_sprite);
say_stop("world?", 1);
say_stop("`7yes Dink, the world... now shut up, stop taking my moment, i only have about 1 miniute in this entire dmod!", ¤t_sprite);
say_stop("well you better stop wasting time!", 1);
say_stop("`7please dink", ¤t_sprite);
say_stop("`7the witch who posseses it is called Bertha Haggiswood, i understand that she was your neighbour when you were younger.", ¤t_sprite);
say_stop("`7the witches cottage lies beyond the frozen forest, thats all we know.", ¤t_sprite);
say_stop("`7if you go north to a town called brimana you can then go east to the frozen forest", ¤t_sprite);
say_stop("`7but im afraid you'll need to find your own way to her cottage.", ¤t_sprite);
say_stop("`7good luck dink", ¤t_sprite);
unfreeze(1);
unfreeze(¤t_sprite);
&intro = 1;
}
}
thanks.
edit: i dont know why ¤t_Sprite shows up funny
Ahhh... okay that explains all. The text in the line after "world?" is too long for Dink to display. The engine can only handle a limited amount of characters in a say or say_stop or whatever command. Too bad I don't know the exact amount.
Btw the ¤t_sprite thing only occurs if you've pressed the modify-button, and is an error of the board. To make sure it won't happen, you must type &current_sprite.
Btw the ¤t_sprite thing only occurs if you've pressed the modify-button, and is an error of the board. To make sure it won't happen, you must type &current_sprite.