📧 Message Board Archive

scripting help
i have begun learning me dinkc, and used the tutorial (tut1.txt) in the develop map, but when i should make a tree who said "Ouch" in red when i hit it, it doesnt say anything at all. dink shall say "that was a nice tree" when i talk to it and the tree shall say "thank you, human". i have assigned tree.c to the tree and here is it:

void main( void )

{



}



void talk( void )

{

say("That's a nice tree.", 1);

wait(500);

say("Thank you, human", &current_sprite);

}



void hit( void )

{

wait(0);

say("'4Ouch!", &current_sprite);

}



I have saved it in the story folder under my dmod's folder, and when i assigned the tree to it i just wrote tree (not tree.c) as i should. can you please help me?
Re: scripting help
If you did all the things you said here, the only problem I saw is you shouldn't assign tree.c to the tree. You should assign tree instead. Since DinkC was designed to work for both tree.c and tree.d so I guess Dink engine was trying to find a script called tree.c.c or tree.c.d or something silly like them.



: i have begun learning me dinkc, and used the tutorial (tut1.txt) in the develop map, but when i should make a tree who said "Ouch" in red when i hit it, it doesnt say anything at all. dink shall say "that was a nice tree" when i talk to it and the tree shall say "thank you, human". i have assigned tree.c to the tree and here is it:



: void main( void )



: {



: }



: void talk( void )



: {



: say("That's a nice tree.", 1);



: wait(500);



: say("Thank you, human", &current_sprite);



: }



: void hit( void )



: {



: wait(0);



: say("'4Ouch!", &current_sprite);



: }



: I have saved it in the story folder under my dmod's folder, and when i assigned the tree to it i just wrote tree (not tree.c) as i should. can you please help me?



Re: scripting help
but i assigned it to tree, not tree.c





: If you did all the things you said here, the only problem I saw is you shouldn't assign tree.c to the tree. You should assign tree instead. Since DinkC was designed to work for both tree.c and tree.d so I guess Dink engine was trying to find a script called tree.c.c or tree.c.d or something silly like them.



: : i have begun learning me dinkc, and used the tutorial (tut1.txt) in the develop map, but when i should make a tree who said "Ouch" in red when i hit it, it doesnt say anything at all. dink shall say "that was a nice tree" when i talk to it and the tree shall say "thank you, human". i have assigned tree.c to the tree and here is it:



: : void main( void )



: : {



: : }



: : void talk( void )



: : {



: : say("That's a nice tree.", 1);



: : wait(500);



: : say("Thank you, human", &current_sprite);



: : }



: : void hit( void )



: : {



: : wait(0);



: : say("'4Ouch!", &current_sprite);



: : }



: : I have saved it in the story folder under my dmod's folder, and when i assigned the tree to it i just wrote tree (not tree.c) as i should. can you please help me?



Re: scripting help
: i have begun learning me dinkc, and used the tutorial (tut1.txt) in the develop map, but when i should make a tree who said "Ouch" in red when i hit it, it doesnt say anything at all. dink shall say "that was a nice tree" when i talk to it and the tree shall say "thank you, human". i have assigned tree.c to the tree and here is it:



: void main( void )



: {



: }



: void talk( void )



: {



: say("That's a nice tree.", 1);



: wait(500);



: say("Thank you, human", &current_sprite);



: }



: void hit( void )



: {



: wait(0);



: say("'4Ouch!", &current_sprite);



: }



: I have saved it in the story folder under my dmod's folder, and when i assigned the tree to it i just wrote tree (not tree.c) as i should. can you please help me?



Man, it's been a long time since I did that tutorial, but I do remember that problem.  First of all, this script doesn't need a "void main", since nothing is done there.  Secondly, the "wait(0);" is completely unnessary, and is most likely the culprit in the script failure.  (Waiting for 0 milliseconds accomplishes absolutely nothing)

Your new "tree.c" should look something like this:



void talk()

{

say("That's a nice tree.", 1);

wait(500);

say("Thank you, human", &current_sprite);

}



void hit()

{

say("'4Ouch!", &current_sprite);

}





NOTE: If you notice, the word, void, inbetween the paranthesis is completely unnessary, too.  It doesn't hurt anything, but it doesn't do any good either.



Hope this helps.
Re: scripting help
: : i have begun learning me dinkc, and used the tutorial (tut1.txt) in the develop map, but when i should make a tree who said "Ouch" in red when i hit it, it doesnt say anything at all. dink shall say "that was a nice tree" when i talk to it and the tree shall say "thank you, human". i have assigned tree.c to the tree and here is it:



: : void main( void )



: : {



: : }



: : void talk( void )



: : {



: : say("That's a nice tree.", 1);



: : wait(500);



: : say("Thank you, human", &current_sprite);



: : }



: : void hit( void )



: : {



: : wait(0);



: : say("'4Ouch!", &current_sprite);



: : }



: : I have saved it in the story folder under my dmod's folder, and when i assigned the tree to it i just wrote tree (not tree.c) as i should. can you please help me?



: Man, it's been a long time since I did that tutorial, but I do remember that problem. First of all, this script doesn't need a "void main", since nothing is done there. Secondly, the "wait(0);" is completely unnessary, and is most likely the culprit in the script failure. (Waiting for 0 milliseconds accomplishes absolutely nothing)



: Your new "tree.c" should look something like this:



: void talk()



: {



: say("That's a nice tree.", 1);



: wait(500);



: say("Thank you, human", &current_sprite);



: }



: void hit()



: {



: say("'4Ouch!", &current_sprite);



: }



: NOTE: If you notice, the word, void, inbetween the paranthesis is completely unnessary, too. It doesn't hurt anything, but it doesn't do any good either.



: Hope this helps.



i changed it, but it has no effect. :(
No luck :-(    :-(    :-(    :-(    :-(    :-(    :-(    :-(
: : : i have begun learning me dinkc, and used the tutorial (tut1.txt) in the develop map, but when i should make a tree who said "Ouch" in red when i hit it, it doesnt say anything at all. dink shall say "that was a nice tree" when i talk to it and the tree shall say "thank you, human". i have assigned tree.c to the tree and here is it:



: : : void main( void )



: : : {



: : : }



: : : void talk( void )



: : : {



: : : say("That's a nice tree.", 1);



: : : wait(500);



: : : say("Thank you, human", &current_sprite);



: : : }



: : : void hit( void )



: : : {



: : : wait(0);



: : : say("'4Ouch!", &current_sprite);



: : : }



: : : I have saved it in the story folder under my dmod's folder, and when i assigned the tree to it i just wrote tree (not tree.c) as i should. can you please help me?



: : Man, it's been a long time since I did that tutorial, but I do remember that problem. First of all, this script doesn't need a "void main", since nothing is done there. Secondly, the "wait(0);" is completely unnessary, and is most likely the culprit in the script failure. (Waiting for 0 milliseconds accomplishes absolutely nothing)



: : Your new "tree.c" should look something like this:



: : void talk()



: : {



: : say("That's a nice tree.", 1);



: : wait(500);



: : say("Thank you, human", &current_sprite);



: : }



: : void hit()



: : {



: : say("'4Ouch!", &current_sprite);



: : }



: : NOTE: If you notice, the word, void, inbetween the paranthesis is completely unnessary, too. It doesn't hurt anything, but it doesn't do any good either.



: : Hope this helps.



: i changed it, but it has no effect. :(
help me!!! everybody
: : : : i have begun learning me dinkc, and used the tutorial (tut1.txt) in the develop map, but when i should make a tree who said "Ouch" in red when i hit it, it doesnt say anything at all. dink shall say "that was a nice tree" when i talk to it and the tree shall say "thank you, human". i have assigned tree.c to the tree and here is it:



: : : : void main( void )



: : : : {



: : : : }



: : : : void talk( void )



: : : : {



: : : : say("That's a nice tree.", 1);



: : : : wait(500);



: : : : say("Thank you, human", &current_sprite);



: : : : }



: : : : void hit( void )



: : : : {



: : : : wait(0);



: : : : say("'4Ouch!", &current_sprite);



: : : : }



: : : : I have saved it in the story folder under my dmod's folder, and when i assigned the tree to it i just wrote tree (not tree.c) as i should. can you please help me?



: : : Man, it's been a long time since I did that tutorial, but I do remember that problem. First of all, this script doesn't need a "void main", since nothing is done there. Secondly, the "wait(0);" is completely unnessary, and is most likely the culprit in the script failure. (Waiting for 0 milliseconds accomplishes absolutely nothing)



: : : Your new "tree.c" should look something like this:



: : : void talk()



: : : {



: : : say("That's a nice tree.", 1);



: : : wait(500);



: : : say("Thank you, human", &current_sprite);



: : : }



: : : void hit()



: : : {



: : : say("'4Ouch!", &current_sprite);



: : : }



: : : NOTE: If you notice, the word, void, inbetween the paranthesis is completely unnessary, too. It doesn't hurt anything, but it doesn't do any good either.



: : : Hope this helps.



: : i changed it, but it has no effect. :(



redink1?
: : : : : i have begun learning me dinkc, and used the tutorial (tut1.txt) in the develop map, but when i should make a tree who said "Ouch" in red when i hit it, it doesnt say anything at all. dink shall say "that was a nice tree" when i talk to it and the tree shall say "thank you, human". i have assigned tree.c to the tree and here is it:



: : : : : void main( void )



: : : : : {



: : : : : }



: : : : : void talk( void )



: : : : : {



: : : : : say("That's a nice tree.", 1);



: : : : : wait(500);



: : : : : say("Thank you, human", &current_sprite);



: : : : : }



: : : : : void hit( void )



: : : : : {



: : : : : wait(0);



: : : : : say("'4Ouch!", &current_sprite);



: : : : : }



: : : : : I have saved it in the story folder under my dmod's folder, and when i assigned the tree to it i just wrote tree (not tree.c) as i should. can you please help me?



: : : : Man, it's been a long time since I did that tutorial, but I do remember that problem. First of all, this script doesn't need a "void main", since nothing is done there. Secondly, the "wait(0);" is completely unnessary, and is most likely the culprit in the script failure. (Waiting for 0 milliseconds accomplishes absolutely nothing)



: : : : Your new "tree.c" should look something like this:



: : : : void talk()



: : : : {



: : : : say("That's a nice tree.", 1);



: : : : wait(500);



: : : : say("Thank you, human", &current_sprite);



: : : : }



: : : : void hit()



: : : : {



: : : : say("'4Ouch!", &current_sprite);



: : : : }



: : : : NOTE: If you notice, the word, void, inbetween the paranthesis is completely unnessary, too. It doesn't hurt anything, but it doesn't do any good either.



: : : : Hope this helps.



: : : i changed it, but it has no effect. :(



Re: redink1?
Someone will see this and help you, but I'm sure it doesn't help to ask 4 times in a hour..
Re: redink1?
: Someone will see this and help you, but I'm sure it doesn't help to ask 4 times in a hour..



you know some dinkc. cant you help me?
Re: redink1?
: : Someone will see this and help you, but I'm sure it doesn't help to ask 4 times in a hour..



: you know some dinkc. cant you help me?



I once had an odd problem like that. It turned out to be the text file type. I found I can only use notepad text files and to start, I even had to copy one that was already there, empty the contents(delete), then write my own script. And make sure the file properties has "read only" un-checked , Don't get discouraged, once you get the hang of it , it's realy cool!
Re: redink1?
: : : Someone will see this and help you, but I'm sure it doesn't help to ask 4 times in a hour..



: : you know some dinkc. cant you help me?



: I once had an odd problem like that. It turned out to be the text file type. I found I can only use notepad text files and to start, I even had to copy one that was already there, empty the contents(delete), then write my own script. And make sure the file properties has "read only" un-checked , Don't get discouraged, once you get the hang of it , it's realy cool!



i'll try that :)
No luck :-(    :-(    :-(    :-(    :-(    :-(    :-(    :-(    II
: : : : Someone will see this and help you, but I'm sure it doesn't help to ask 4 times in a hour..



: : : you know some dinkc. cant you help me?



: : I once had an odd problem like that. It turned out to be the text file type. I found I can only use notepad text files and to start, I even had to copy one that was already there, empty the contents(delete), then write my own script. And make sure the file properties has "read only" un-checked , Don't get discouraged, once you get the hang of it , it's realy cool!



: i'll try that :)



I have found that i cant assign scripts to that tree. :( . the same scripts work fine on other sprites. The other scripts who work on the other sprites do not work on my tree. i tried the "i'm tree years old. HAW HAW HAW!" script. it worked on a dead girl, but not on the tree! its a pine tree, just as in the original game. :(
Re: No luck :-( :-( :-( :-( :-( :-( :-( :-( II
: : : : : Someone will see this and help you, but I'm sure it doesn't help to ask 4 times in a hour..



: : : : you know some dinkc. cant you help me?



: : : I once had an odd problem like that. It turned out to be the text file type. I found I can only use notepad text files and to start, I even had to copy one that was already there, empty the contents(delete), then write my own script. And make sure the file properties has "read only" un-checked , Don't get discouraged, once you get the hang of it , it's realy cool!



: : i'll try that :)



: I have found that i cant assign scripts to that tree. :( . the same scripts work fine on other sprites. The other scripts who work on the other sprites do not work on my tree. i tried the "i'm tree years old. HAW HAW HAW!" script. it worked on a dead girl, but not on the tree! its a pine tree, just as in the original game. :(



now, it worked. i'll try with my own script too
Re: No luck :-( :-( :-( :-( :-( :-( :-( :-( II
: : : : : : Someone will see this and help you, but I'm sure it doesn't help to ask 4 times in a hour..



: : : : : you know some dinkc. cant you help me?



: : : : I once had an odd problem like that. It turned out to be the text file type. I found I can only use notepad text files and to start, I even had to copy one that was already there, empty the contents(delete), then write my own script. And make sure the file properties has "read only" un-checked , Don't get discouraged, once you get the hang of it , it's realy cool!



: : : i'll try that :)



: : I have found that i cant assign scripts to that tree. :( . the same scripts work fine on other sprites. The other scripts who work on the other sprites do not work on my tree. i tried the "i'm tree years old. HAW HAW HAW!" script. it worked on a dead girl, but not on the tree! its a pine tree, just as in the original game. :(



: now, it worked. i'll try with my own script too



i am in the dink chatroom!!! do you want to come there too?
Re: No luck :-( :-( :-( :-( :-( :-( :-( :-( II
: : : : : : : Someone will see this and help you, but I'm sure it doesn't help to ask 4 times in a hour..



: : : : : : you know some dinkc. cant you help me?



: : : : : I once had an odd problem like that. It turned out to be the text file type. I found I can only use notepad text files and to start, I even had to copy one that was already there, empty the contents(delete), then write my own script. And make sure the file properties has "read only" un-checked , Don't get discouraged, once you get the hang of it , it's realy cool!



: : : : i'll try that :)



: : : I have found that i cant assign scripts to that tree. :( . the same scripts work fine on other sprites. The other scripts who work on the other sprites do not work on my tree. i tried the "i'm tree years old. HAW HAW HAW!" script. it worked on a dead girl, but not on the tree! its a pine tree, just as in the original game. :(



: : now, it worked. i'll try with my own script too



: i am in the dink chatroom!!! do you want to come there too?



i am there, but you are not there. my script works fine now, but i did not do any changes :)