Location: JBPLAY \ Meteor 2 \ Editing \ if (StaticFlags[0]) == 0 //problems with this script Back to Threads |
me_mantis
![]() Joined: 26 September 2003 Posts: 1152 |
28 October 2007 00:31 (UK time)
if (StaticFlags[0]) == 0; This should be way more like if (StaticFlags[0] == 0); =) You need to login to create posts in this thread. |
Dthdealer
![]() Joined: 10 March 2007 Posts: 476 |
28 October 2007 01:15 (UK time)
Still won't work. It skips the "if" line and runs the nested script anyways.
You need to login to create posts in this thread. |
nyasudah![]()
Joined: 06 February 2005 Posts: 832 |
28 October 2007 03:52 (UK time)
Remove the ; at the end of the if lines. if (StaticFlags[0] == 0) { }
Edited: 28 October 2007 03:57 You need to login to create posts in this thread. |
Dthdealer
![]() Joined: 10 March 2007 Posts: 476 |
28 October 2007 05:10 (UK time)
Woot! Thank you, now works.
You need to login to create posts in this thread. |
Dthdealer
![]() Joined: 10 March 2007 Posts: 476 |
28 October 2007 05:41 (UK time)
New problem to do with staticflags again. I've never used a variable or staticflag before so I'm not too good at them.
You need to login to create posts in this thread. |
nyasudah![]()
Joined: 06 February 2005 Posts: 832 |
28 October 2007 05:48 (UK time)
You really messed things up.. Try this one: export YourFunctionNameHere; void YourFunctionNameHere() { if (StaticFlags[3] == 2) { SC_SetSectorHidden(18,1); } }
You need to login to create posts in this thread. |
me_mantis
![]() Joined: 26 September 2003 Posts: 1152 |
01 November 2007 14:11 (UK time)
oops.. I haven't coded in a while, so I didn't realize the extra ; was there =P gl! You need to login to create posts in this thread. |
Dthdealer
![]() Joined: 10 March 2007 Posts: 476 |
03 November 2007 05:58 (UK time)
I wish the command to execute when StaticFlags[3] == 2, not when called for by another script or script sector
You need to login to create posts in this thread. |
nyasudah![]()
Joined: 06 February 2005 Posts: 832 |
03 November 2007 07:50 (UK time)
but you can change the value of a staticflag only with another script as i know
You need to login to create posts in this thread. |
Dthdealer
![]() Joined: 10 March 2007 Posts: 476 |
23 November 2007 06:38 (UK time)
Worked it out. Just had to put the If line after the lines that sets the static flag +1 on each of the scripts.
You need to login to create posts in this thread. |
|
Forums system (C) 1999-2023 by James Bunting.
Terms of Use