The Dink Network

What's wrong with this script?

July 4th 2011, 08:08 AM
boncag.gif
Godley
Peasant They/Them
 
void talk(void)
{
freeze(1);
say_stop("`%Welcome to " , &current_sprite);
say_stop("Wow!" , 1);
unfreeze(1);
}
July 4th 2011, 08:13 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
Absolutely positively nothing.
July 4th 2011, 08:14 AM
boncag.gif
Godley
Peasant They/Them
 
Then why doesnt it work?
July 4th 2011, 08:14 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
What are all the random ' doing there?
July 4th 2011, 08:16 AM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
My

void talk(void);


has a ; after it is the only difference

Edit: darnit meta always faster the ` is a different colour I thought
July 4th 2011, 08:17 AM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
That's wrong, MsDink.

Edit: you've probably forgot to place the sprite which the script refers to, lol.
July 4th 2011, 08:19 AM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
@ Marp, how come ? It works
July 4th 2011, 08:20 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
If it doesn't work it's probably not attached properly. Or it is not an actual .c file. Copy a script from a different DMOD and edit that to make sure that your file is a good .c file. And double check the name you gave to the script and the one you have in the editor.

Also, make sure the object that the script is attached to is of the person/creature type.
July 4th 2011, 08:21 AM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
It might mess up, MsDink, even if it works most of the time, so you shouldn't write like that
July 4th 2011, 08:22 AM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
Yeah it might work, but you shouldn't have them on procedures... Might cause problems (I don't really know the consequences).

Edit: Aw, IPD.
July 4th 2011, 08:24 AM
custom_iplaydink.gif
iplaydink
Peasant He/Him Sweden
Hmm.. 
I'm so fast
July 4th 2011, 08:24 AM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
oh ok thanks for the tip
deletes all instances

Edit dang you beat me as well IPD heh
July 4th 2011, 08:25 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
As I said, Godley. Remove all the random ' marks.
July 4th 2011, 08:26 AM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
I don't see any ' marks?
July 4th 2011, 08:27 AM
boncag.gif
Godley
Peasant They/Them
 
I have attached it to a signboard.
July 4th 2011, 08:30 AM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
the `% is the speech colour as I said before
July 4th 2011, 08:30 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
This is how it appears to me.

void�talk(void)
{
freeze(1);
say_stop("`%Welcome to "�,�&current_sprite);
say_stop("Wow!"�,�1);
unfreeze(1);
}

The boxes are ' to me.
July 4th 2011, 08:37 AM
boncag.gif
Godley
Peasant They/Them
 
The script seems flawless to me.

And yet it doesnt work.
July 4th 2011, 08:43 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
Try using DSHFN. It highlights most mistakes in the script. Although I don't know about this one. If I'm the only one who sees the ' marks, I can't see any problems in the script.
July 4th 2011, 08:44 AM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
What doesn't work with it? Does the game crash? Doesn't it run at all? What is exactly the problem?
July 4th 2011, 08:48 AM
boncag.gif
Godley
Peasant They/Them
 
I attached it to a signboard.

And when I pres sspacebar next to the signboard, nothing happens.

Dink says "I cant see anything here," and all the routine crap.
July 4th 2011, 08:50 AM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
What is the name and the file extension of the script?
July 4th 2011, 08:53 AM
boncag.gif
Godley
Peasant They/Them
 
sign2
And the extension it C file
July 4th 2011, 08:56 AM
anon.gif
Orpram
Ghost They/Them
 
"sign2.c" or "sign2.c.txt"? common noobish mistake.
July 4th 2011, 08:57 AM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
This may sound like a stupid question, but are you sure the sign has the script "sign2" attached, and not "sign2.c" or anything like that?
July 4th 2011, 08:57 AM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
lol marpro as well -
is it a person / creature in the properties?
Hard?
July 4th 2011, 09:00 AM
boncag.gif
Godley
Peasant They/Them
 
Yes, its hard.
July 4th 2011, 09:03 AM
girl.gif
bornfree15
Peasant They/Them United States
Eyevan 
did you put the file in the story folder of your d-mod?
July 4th 2011, 09:04 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
The hardness nor the person/creature, nor most of the other stuff in the properties have nothing to do why this script wouldn't work.

This will sound stupid, but check the visions. Maybe only one of the visions has the script attached to the sign.

Or maybe make a copy of an actual working script. Take this non-working script and place it over the working one. Then check if it works in that environment. This will make sure if there's a problem with the script or something to do with the editor.

In the end, it will probably turn out to be something simple, which is always annoying.
July 4th 2011, 09:04 AM
boncag.gif
Godley
Peasant They/Them
 
I did.
July 4th 2011, 09:10 AM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
Test it with this if you wanna (it works in mine)

void talk(void)
{
   freeze(1);
   say_stop("Statue of Likeness",&current_sprite);
   say_stop("Gaze into my eyes...",&current_sprite);
   wait(600);   
   say_stop("Stoppitt... you are freaking me out!",&current_sprite);
   wait(300);
   unfreeze(1);
}


Take the waits out (mine is paced for a reason)

edit eww it pastes weird... fixed i hope
July 4th 2011, 09:18 AM
custom_msdink.png
MsDink
Peasant She/Her New Zealand
Tag - Umm.. tag, you're it? 
um is there supposed to be a space between your ,(space)&current_sprite?
Mine doesn't and still works...
Anyways best of luck
July 4th 2011, 09:27 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
You don't need to have the space there but it's far more clearer if you do.
July 4th 2011, 11:13 AM
boncag.gif
Godley
Peasant They/Them
 
Okay

someone write a code in which I can say

hey in white
hello in yellow.
July 4th 2011, 11:17 AM
boncag.gif
Godley
Peasant They/Them
 
DinkC editor gives me the following error report

Line#1 - Warning: This line is out of any function
Line#2 - Warning: This line is out of any function
Line#3 - Warning: This line is out of any function
Line#4 - Warning: This line is out of any function
Line#5 - Warning: This line is out of any function
Line#6 - Warning: This line is out of any function
Line#7 - Warning: This line is out of any function
Error: A script should contain at least one function, marked by "void"
July 4th 2011, 12:31 PM
boncag.gif
Godley
Peasant They/Them
 
void talk( void )
{
say_stop("Welcome to Village" , &current_sprite);
say_stop("'% Wow!" , 1);
}


Even this doesnt work.

And a second question.
What is the file type supposed to be?
.txt or all files?

PS neither work
July 4th 2011, 12:58 PM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
Did you create a new .txt file for the script? Instead you should copy another script and overwrite it with your own script, cause .txt files don't work.
July 4th 2011, 12:59 PM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
Upload your d-mod on megaupload or something for us to check it out. It's fine if you strip out most of it if you want to keep it secret, just leave in the part you want fixed and we'll probably have it fixed in no time
July 4th 2011, 01:00 PM
boncag.gif
Godley
Peasant They/Them
 
All I have is one screen.

Deleted the almost complete D-Mod, just to vent out my frustration.
July 4th 2011, 01:02 PM
duck.gif
Now that you've vented your frustration, see if you can undelete it. I'm sure it'll save you some work.
July 4th 2011, 01:17 PM
spike.gif
What is the file type supposed to be?
.txt or all files?


As someone said, it needs to be a .c file... Even if it says just "script.c", it might still secretly be a text file, because Windows likes to hide useful information from the user. To make sure you can see the correct extension,

go to Tools -> Folder Options, and uncheck the "hide extensions for known file types" box.

If after that the script shows up with a .txt extension, you need to rename that to .c.
July 4th 2011, 01:23 PM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
As someone said, it needs to be a .c file

Oh, I said that, I said that! *Jumps in the air waving*
July 4th 2011, 01:34 PM
boncag.gif
Godley
Peasant They/Them
 
Hey wait.

Notepad has no tools.
July 4th 2011, 01:35 PM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
Settle down, boy... I mentioned that ages ago.
July 4th 2011, 01:39 PM
duck.gif
Try Notepad++. It has syntax highlighting and stuff. It's very popular.
July 4th 2011, 01:39 PM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
Lol, I was just joking at how Scratcher doesn't dare to mention anything positive about me, cause he's got his "problems" with me.
July 5th 2011, 02:06 AM
spike.gif
What the...? You didn't even mention .c files, so by your logic, I have "problems" with Marpro and Metatarasal.

Rest assured, if I don't say anything positive about you, it's only because you're a ducking retard and there's nothing positive to say.

Godley: Sorry, that was unclear... Go to My Computer, and look for Tools on the menu bar.
July 5th 2011, 03:08 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
You have problems with me?
July 5th 2011, 03:16 AM
pillbug.gif
pillbug
Peasant He/Him United States
Love! True love! 
Doesn't everyone?
July 5th 2011, 03:31 AM
boncag.gif
Godley
Peasant They/Them
 
It worked.
July 5th 2011, 03:31 AM
boncag.gif
Godley
Peasant They/Them
 
And, I, for one, have no problem with meta.
July 5th 2011, 03:31 AM
pillbug.gif
pillbug
Peasant He/Him United States
Love! True love! 
Yay!
July 5th 2011, 03:57 AM
boncag.gif
Godley
Peasant They/Them
 
Was that yay for my not having a problem with meta, or for my being able to run the script?
July 5th 2011, 06:26 AM
custom_skull.gif
Skull
Peasant He/Him Finland bloop
A Disembodied Sod 
Actually, I don't see anyone mentioning about .c files and .txt files not working, before me. Not Marpro, nor Meta.

And your post kinda proves you have some silly "problems" with me, and with life. xD

EDIT: Wait... Metatarasal did. Rofl.