The Dink Network

Reply to Re: sp_target() bug

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:
 
 
September 22nd 2005, 02:17 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
13 is the sprite number as found in the editor, right? This is the sp_editor_num(##), or the "editor number". The sprite with "editor number" 1 will be the first sprite placed on the screen in the editor, not Dink. All script commands need "sprite numbers". Conversion is done with sp(##). Look at

int &crap = sp_editor_num(&current_sprite);
int &trash = sp(&crap);
if (&current_sprite == &trash)
{
say("Always says this if sprite is placed in the editor",&current_sprite);
}

and:

int &crap = sp(13);
int &trash = sp_editor_num(&crap);
if (&trash == 13)
{
say("Always says this if sprite is placed in the editor",&current_sprite);
}