The Dink Network

What is the problem

January 15th 2011, 07:52 AM
pq_rabbit.gif
this script isnt worcking plz helpvoid
void talk(void)
{
freeze(1);
if(&story==0)
{
say_stop("`5Hullo Lad",&current_sprite);
}
if(&story==1)
{
say_stop("The captain told me to go tell you to get the people ready to leave",1);
say_stop("`5 Aye lad il get everyone ready you go down to the boat",1);
&story==2;
}
if(&story==2)
{
say_stop("`5Lad you should go to the boat now",&current_sprite);
}
unfreeze(1);
}

btw i use notepad and windinkedit for my d-mod
January 15th 2011, 07:56 AM
knights.gif
pathfinder
Peasant He/Him China
I love hanging ON LINE without doing anything... 
Ummm...maybe you should have a [goto end;] at the end of each choice...like this:
void talk(void)
{
freeze(1);
if(&story==0)
{
say_stop("`5Hullo Lad",&current_sprite);
goto end;
}
if(&story==1)
{
say_stop("The captain told me to go tell you to get the people ready to leave",1);
say_stop("`5 Aye lad il get everyone ready you go down to the boat",1);
&story==2;
goto end;
}
if(&story==2)
{
say_stop("`5Lad you should go to the boat now",&current_sprite);
goto end;
}
end:
unfreeze(1);
}
January 15th 2011, 08:00 AM
boncag.gif
JugglingDink
Peasant He/Him United Kingdom
Streetfish 
You haven't said what the problem is with your script, but the thing that leaps out at me is that you've put
&story == 2;

when you should actually put
&story = 2;

because you only need one = sign.

Also, some smaller things: You haven't got a freeze(&current_sprite); or an unfreeze(&current_sprite);
Also, dink is saying the "Aye lad il get everyone ready you go down to the boat" line instead of the sailor (I assume that's who he is).
January 15th 2011, 06:09 PM
pq_rabbit.gif
its stiill not worcking and when story is on 0 it wont even say that some small error
January 15th 2011, 06:24 PM
boncag.gif
JugglingDink
Peasant He/Him United Kingdom
Streetfish 
Hmm, I'm not too sure... There's not really anything else I notice.

It could possibly becuase you put
say_stop("`5Hullo Lad",&current_sprite);
//There is no space between the comma and the &current_sprite


instead of
say_stop("`5Hullo Lad", &current_sprite);
//There IS a space between the comma and the &current_sprite


I don't really know if that would affect anything to be honest, but it's the only other thing I can think of...
January 15th 2011, 06:30 PM
spike.gif
That might well be the problem, although it doesn't matter in the example you provided.

Try writing
if (&story == 0)
instead of
if(&story==0)

Also, does the script run at all? If you add
void hit()
{
say("Die unworking mongrel!",1);
}
to the script, does Dink say it when you hit him? If not, it might be a simple typo, or the script might be a SCRIPT.c.txt file instead of a SCRIPT.c file.
January 15th 2011, 07:57 PM
pq_rabbit.gif
Thanks guys i used every hint from u guys and it seems to be worcking so thanks XD its good to knowe thers some friendly ppl at dinknetworck XD
January 15th 2011, 09:49 PM
sob_scorpy.gif
DinkDude95
Peasant He/Him Australia
The guy with the cute D-Mod. 
Friendly people?! Where??!!

I'll get rid of 'em...
January 16th 2011, 07:49 AM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
Try to remember what went wrong so you won't make the same mistake again, that's the learning process you need to go through
January 16th 2011, 06:01 PM
pq_rabbit.gif
yeargh i keep my old cript next no new one while i make it so i know its right