The Dink Network

Reply to Re: Weird script problem

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
April 9th 2006, 08:22 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Why even use a separate procedure? Custom procedures (and calling of procedures) is a tricky thing in DinkC. It creates a new instance of the script, instead of 'jumping' to it.

You might try (instead of the commented lines):

pool:

&crap = get_rand_sprite_with_this_brain(9, &current_sprite);
say_stop_npc("I'm talking!", &crap);

&wait = random(1000, 1000);
wait(&wait);

goto pool;

Also, as Ric said, you should put 'int &crap' and 'int &en' before the loops. Using int in a loop can be tricky. BUT when you keep using the speak() proc, then you do need to 'int &crap'. This has to do with those different script-instances (local variables don't transfer).