The Dink Network

dang theese danged faulty scrips....

April 24th 2005, 02:37 AM
pig.gif
Sorry about the frequency of theese posts, its just i've forgotton most of what i used to know. anyway, the void die procedure doesent run at all. I think I might also put the other script that leads to it on incase it has something to do with the problem.

Arena.c - this is the room in which the fight happens.
void main(void)
{
if(&gladfight == 1)
{
screenlock(1);
&vision = 1;
say("here goes nothing", 1);
playmidi("f1.mid");
int &bob = create_sprite(460, 220, 7, 390, 1);
say("`3I shall eat you!", &bob);
sp_base_walk(&bob, 390);
sp_frame(&bob, 1);
sp_seq(&bob, 390);
sp_brain(&bob, 9);
sp_speed(&bob, 1);
sp_exp(&bob, 100);
sp_script(&bob, opponent-bob);
sp_base_walk(&bob, 390);
sp_target(&bob, 1);
sp_touch_damage(&bob, 2);
sp_hitpoints(&bob, 10);
sp_dir(bob, 1);
}
}

opponent-bob.c - the script that has the die procedure for bob. its not attached to anything because bobs not in the editor.
void die(void)
{
say("owww, that fellow took a bite out of my arm!", 1);
script_attach(1000);
&player_map = 140;
fade_down();
wait(400);
load_screen();
sp_x(1, 295);
sp_y(1, 370);
sp_dir(1, 2);
draw_screen();
fade_up();
Kill_this_task();
}

Thanks.

EDIT: fellow is actualy funnier than ba*****
April 24th 2005, 03:51 AM
goblinm.gif
1. I've always prefered 8-character script names, although I don't think longer cause problems. Also, the dash makes me queasy.

2. Quote marks in the sp_script command:

sp_script(&bob, "opponent-bob");

April 24th 2005, 04:25 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
8 characters is better. Although it won't give problems when you keep them in .c format, the .d file will have a ~1 behind it (or ~2 etc...)
April 24th 2005, 01:27 PM
anon.gif
spacehoggy
Ghost They/Them
 
Ah, brilliant, thanks milo. It was due to the, lack of speechmarks in sp_script();. I thought that to about dash, but in the actual game, theres loads of things like that. En-pill, S1-cave ect.
April 24th 2005, 03:22 PM
goblinm.gif
Heh, forgot about those.
April 24th 2005, 05:47 PM
pig.gif
I've got another script thats faulty. sorry again agout all this, its just i spend hours trying to get scripts to work before i post them, but i can never get em to work. if you dont mind, keep on reading... excellent, thanks. Heres the script with the problem, and the problem is that it doesent run at all.

ccahier.c - it doesent fun at all.

void talk(void)
{
freeze(1);
say_stop("`8Hi Dink, you have &credit credit left. What do you want to do with it?", &current_sprite);
choice_start()
"Take out all money."
"leave"
choice_end()

if(&result == 1);
{
&gold = (&gold += &credit); //I think this might be where the problem is...
}
unfreeze(1);
}

Thanks guys.
April 24th 2005, 06:00 PM
spike.gif
If it doesn't run at all, you have attachment problems. btw just do

&gold += &credit;