The Dink Network

Reply to Re: Scripting help

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 23rd 2014, 08:14 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
Are &wid and &invplace defined as global variables in main.c? If not, you need to make sure you declare them as local variables, like this for your first script:

void main( void )
{
	if (&story < 10)
	{
		int &wid = create_sprite(364, 218, 16, 411, 1);
    		sp_speed(&wid, 1);
		sp_base_walk(&wid, 410);
    		sp_script(&wid, "T1-B2.c");
	}
}


'int &wid' makes this a local variable that can only be accessed from this script.