Reply to Re: Some problem
If you don't have an account, just leave the password field blank.
Man o' Magic wasn't saying that sp_editor_num(x) = sp(x)... he was saying (put in a valid, DinkC way):
int &editor_sprite1 = 1;
int &active_sprite = sp(&editor_sprite1);
int &editor_sprite2 = sp_editor_num(&active_sprite);
if (&editor_sprite1 == &editor_sprite2)
{
say("They're always equal (unless it doesn't exist)!", 1);
}
That is:
sp_editor_num converts an active sprite number into an editor sprite number.
sp converts an editor sprite number into an active sprite number.
Therefore, if sp_editor_num uses the output of sp as an input, it will result in the input of sp, assuming the editor sprite and the active sprite exist.
All Dink functions (with the exception of editor_seq, editor_frame, and editor_type) use active sprite numbers.
The only valid use of sp is to look in DinkEdit or WinDinkedit, record the editor sprite number of a sprite, and use it as an input in sp to get the active sprite number. However, because editor sprite numbers are apt to change (at least with WinDinkedit), this isn't recommended.
int &editor_sprite1 = 1;
int &active_sprite = sp(&editor_sprite1);
int &editor_sprite2 = sp_editor_num(&active_sprite);
if (&editor_sprite1 == &editor_sprite2)
{
say("They're always equal (unless it doesn't exist)!", 1);
}
That is:
sp_editor_num converts an active sprite number into an editor sprite number.
sp converts an editor sprite number into an active sprite number.
Therefore, if sp_editor_num uses the output of sp as an input, it will result in the input of sp, assuming the editor sprite and the active sprite exist.
All Dink functions (with the exception of editor_seq, editor_frame, and editor_type) use active sprite numbers.
The only valid use of sp is to look in DinkEdit or WinDinkedit, record the editor sprite number of a sprite, and use it as an input in sp to get the active sprite number. However, because editor sprite numbers are apt to change (at least with WinDinkedit), this isn't recommended.