The Dink Network

...When I lose control...

April 29th 2006, 06:03 AM
slayer.gif
Now I have one BIG problem here. My DinkEdit takes no effect whatever I do. I first time noticed this on the As always... Problems thread when I tried to change my dark blue man to green man. Didn't work. Now I realized that my editor is just plain inefficient. No changes have been made to the game...
April 29th 2006, 05:42 PM
dragon.gif
Try using WinDinkedit or WinDinkedit Plus.
May 7th 2006, 03:34 AM
slayer.gif
Whoa, nice. It works. But I cannot attach a script to any sprites.
May 7th 2006, 05:39 AM
dragon.gif
Are you using Dinkedit or WinDinkedit?
May 7th 2006, 07:59 AM
duckdie.gif
But I cannot attach a script to any sprites.

Odd. If you select a sprite, then right-click and select properties, it should work.
May 7th 2006, 03:01 PM
slayer.gif
I'm using WinDinkEdit... And I'm also doing everything DuckLord advised me to. I checked if I really wrote the things correctly at least 3 times. (By the way... I'm not kinda used to WinDinkEdit, is the regular DinkEdit possible?)
May 7th 2006, 04:01 PM
dragon.gif
Odd. What Ducklord said to do should work.
May 7th 2006, 04:34 PM
slayer.gif
Well - it doesn't.
May 8th 2006, 01:56 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
Sure, you can use DinkEdit to attach scripts. And I think that the problem you have isn't with the editor at all, it's rather something like script in the wrong place, wrong format or a scripting error. I mean, how do you know that the script isn't attached?

Or you did something wrong when firing up your DMOD in the editor. It's advisable to fire up DinkEdit with the help of a frontend (probably DFArc2), WinDinkEdit is slightly easier at that.
May 8th 2006, 09:37 AM
slayer.gif
Well. The script might be attached... somehow, but the only effect it takes os like this:

I walk next to the shelf (the sprite) and press spacebar.
Normally, if a script wasn't attached, Dink would say "Not much happening here" or something like that.
However, my Dink says nothing.

It's not a scripting error, that's for sure... Or wait... maybe... I just can't think of any script that could be wrong.
May 8th 2006, 09:42 AM
bonca.gif
Erwin
Peasant He/Him Netherlands
Friendship is magic 
If he says nothing there must be a script attached. So it must be a scripting error. Show us your script if you can't find out what it is.
May 8th 2006, 09:51 AM
slayer.gif
Ookay...

void talk( void )
{
freeze(1)
say_stop("**** *** **** * *** *****, ***'** **** ** *** ******* ***** **.", 1);
say_stop("**** ** **** *****, ******* *** ****** *****.", 1);
unfreeze(1)
}

void hit( void )
{
say("******* ***** ****** ***** **** ***** *****, ***!!", 1);
}

void push( void )
{
say("**** **** **** ** ** ** * **** **...", 1);
}
May 8th 2006, 10:05 AM
bonca.gif
Erwin
Peasant He/Him Netherlands
Friendship is magic 
There's nothing wrong with it... Maybe if you tell exactly what you did.
May 8th 2006, 10:24 AM
duckdie.gif
There are a few things wrong with it. You don't have a void main(void) part, and your freeze lines lack semicolons.

EDIT : Okay, try adding this :

void main(void)
{
sp_touch_damage(&current_sprite, -1);
}
May 8th 2006, 10:32 AM
bonca.gif
Erwin
Peasant He/Him Netherlands
Friendship is magic 
But the script Vukodlak uses just works! And why do you need ; behind freeze I always use it but it also works without it it apears to be. And why would the void main(void) part make it work better?

(I think I realy should read some more in my C manual.)
May 8th 2006, 10:59 AM
duckdie.gif
But the script Vukodlak uses just works!
Not always. It depends on the sprite and on said sprite's properties.

And why do you need ; behind freeze I always use it but it also works without it it apears to be. And why would the void main(void) part make it work better?
Forgetting the ';' sometimes makes the game do odd things, although it's quite rare.
EDIT : The same goes for void main(void).
May 8th 2006, 01:46 PM
slayer.gif
I hate to say "Didn't work" as I have said it sooo veeery many times...

Anyways - This is what I exactly did:

1. I created the shelf sprite.
2. I right-clicked on it.
3. I selected Properties.
4. I wrote "shelve2" on the script box.
5. I did not bother pressing the "edit" button next to the box, as it has never worked to me, it doesn't create a C-file at all. But please don't try to fix this, as it really isn't the problem.
6. I created a C-file into my D-Mod directory called "shelve2".
7. I wrote the script shown above.
8. I played the D-Mod.
9. I walked next to the shelf, pressed spacebar without any text appearing.
10. I added my second post in this topic.

Help meeeeee
May 8th 2006, 02:21 PM
duckdie.gif
Try checking whether you have a file extension problem, like last time. You may have a 'shelve2.c' file which is actually a txt file. Or a c.c file, or something like that. If it still doesn't work, you could try sending me the shelve2 file, I'll look into it if I can.
May 8th 2006, 02:56 PM
spike.gif
The lack of void main() has no bearing on the working of the script. I don't know if the missing ";"s could cause complications, I guess it's best to add them when something doesn't work to rule that possibility out.
May 8th 2006, 03:19 PM
slayer.gif
Nope, there's no .c in the end. It's neither a txt file.
May 8th 2006, 04:48 PM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
Well then what is it? A file can exist without an extension but you should have .c to let the game recognize the file as a script.
May 9th 2006, 12:08 AM
slayer.gif
Oh? I realized it so DuckLord told me I don't need them some time ago, so I deleted every .c extension.
May 9th 2006, 02:20 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
You shouldn't have a file.c.c extension or a file.c.txt extension. (the first one should work when typing file.c in the scriptattachement box(If I'm correct), the latter one won't work at all)

You should have a .c extension though, it's just that windows hides known extensions by default, so when having a 'file.txt' file windows just calls the file 'file'. So when you type 'file.c' the .c part isn't really the extension, the extension is still .txt.

If you're having trouble with extensions there is a much easier way to handle it. Just copy any .c file from another DMOD, change the name and you're done. No need to struggle with extensions. I always do it that way.
May 9th 2006, 04:28 AM
wizardb.gif
Phoenix
Peasant He/Him Norway
Back from the ashes 
it's just that windows hides known extensions by default

That's one of the design decisions that I could never properly grasp. It's just beyond stupid.
May 9th 2006, 10:56 AM
anon.gif
Ducklord
Ghost They/Them
 
Oh? I realized it so DuckLord told me I don't need them some time ago, so I deleted every .c extension.

Nononononononono!
Basically, your script files must be C files. They must have the .c extension, but sometimes Windows hides extensions. This means that it may be a c file but you can't see it. If Windows does hide it, then a .c file would either be a .c.c file or a txt file. You've really got to check your display options. Deactivate the 'hide known extensions' square (or something like that) in Windows Explorer. Yeah, you don't use the English version of Windows. But, duh, neither do I, so you should be able to find the right square that should be deactivated.
May 9th 2006, 03:24 PM
knightg.gif
cypry
Peasant He/Him Romania
Chop your own wood, and it will warm you twice. 
6. You created the script in the story dir, right?
May 10th 2006, 07:58 AM
slayer.gif
Yup, I created the script in the story directory. I'm not quite that newbie in dinkceerdinkediteerprogrammilazingitationeerrrrrwhatever.