The Dink Network

Reply to Re: Custom procedures

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:
 
 
December 21st 2024, 08:32 AM
duck.gif
toof
Peasant He/Him
I disagree. 
I know that this works:
void whatever(void)
{
  int &crap = 0;
  int &sprite = create_sprite(...);
  sp_script(&sprite, "some_script.c");
}

// some_script.c
void main(void)
{
  // &crap is available here
  if(&crap == 1)
  {
    // ...
  }
}


But I don't know when &crap is changed in the child script, its value is affected in the parent script as well. Maybe you can test and check if you can return multiple values that way.

Edit:
Forgot that this runs in parallel, so dang...