Why won't this script compile. >:O -1 reply

Please wait...

Guest

I didn't make it!

0 XP

 
#1 9 years ago

//Generated by BehavEd

declare ( 6, "msg_state" );

task ( "ToggleState" ) {

affect ( "sokkalockstate", 56 ) {

else ( ) { set ( "SET_PARM1", "1" ); set ( "msg_state", "1" );

affect ( "sokkatele_trigger", 56 ) { set ( "SET_TARGET", "sokkatele_locked" ); }

affect ( "sokkatele_msg_trigger", 56 ) { set ( "SET_INACTIVE", "true" ); }

use ( "sokkalock" ); use ( "sokkalock_state" ); } }

if ( get( 6, "SET_PARM1" ) = 1.000000 ) { set ( "SET_PARM1", "0" ); set ( "msg_state", "0" );

affect ( "sokkatele_trigger", 56 ) { set ( "SET_TARGET", "sokkatele" ); }

affect ( "sokkatele_msg_trigger", 56 ) { set ( "SET_INACTIVE", "false" ); }

use ( "sokkalock" ); use ( "sokkalock_state" ); } }

do ( "ToggleState" ); wait ( "ToggleState" );

if ( get( 6, "msg_state" ) = 1.000000 ) { use ( "sokkalock_lock" ); }

else ( ) { use ( "sokkalock_unlock" ); }

free ( "msg_state" );

When I press compile it says, "Error in Block 1", Which is the first line.




UU_BobaFett

JKG Lead coder

50 XP

18th July 2006

0 Uploads

202 Posts

0 Threads

#2 9 years ago

Not sure about the block 1 thing, but i did notice you use an else directly following an affect, which is invalid, as else can only follow an if block.




Guest

I didn't make it!

0 XP

 
#3 9 years ago

Ah, Yeah. I think I accidentally dragged and dropped it in BehavEd, but It still doesn't solve the block one problem. :(




Guest

I didn't make it!

0 XP

 
#4 9 years ago

Maybe It's the BehavEd I have. Can someone give me a link to a download? or can you do that on here?




N-7

... and a nice big Cip-Quad

50 XP

21st September 2007

0 Uploads

579 Posts

0 Threads

#5 9 years ago

Probably, it seems your BehaveEd writes '6' and '56' instead of 'FLOAT' and 'FLUSH' (assuming the MO of the affect instructions is in deed supposed to be 'FLUSH' not 'INSERT').

Here's a fixed version (I left the displaced else branch for you to fix, because - interestingly enough - it compiles just fine as it is):

Spoiler: Show

//Generated by BehavEd

declare ( FLOAT, "msg_state" );

task ( "ToggleState" ) {

affect ( "sokkalockstate", FLUSH ) {

else ( ) { set ( "SET_PARM1", "1" ); set ( "msg_state", "1" );

affect ( "sokkatele_trigger", FLUSH ) { set ( "SET_TARGET", "sokkatele_locked" ); }

affect ( "sokkatele_msg_trigger", FLUSH ) { set ( "SET_INACTIVE", "true" ); }

use ( "sokkalock" ); use ( "sokkalock_state" ); } }

if ( get( FLOAT, "SET_PARM1" ) = 1.000000 ) { set ( "SET_PARM1", "0" ); set ( "msg_state", "0" );

affect ( "sokkatele_trigger", FLUSH ) { set ( "SET_TARGET", "sokkatele" ); }

affect ( "sokkatele_msg_trigger", FLUSH ) { set ( "SET_INACTIVE", "false" ); }

use ( "sokkalock" ); use ( "sokkalock_state" ); } }

do ( "ToggleState" ); wait ( "ToggleState" );

if ( get( FLOAT, "msg_state" ) = 1.000000 ) { use ( "sokkalock_lock" ); }

else ( ) { use ( "sokkalock_unlock" ); }

free ( "msg_state" );

And here's the link to the SDK, which contains the authoritative versions of BehavEd and Ibize: Jedi Academy SDK (MP)




Guest

I didn't make it!

0 XP

 
#6 9 years ago

Thank You!!!!




Guest

I didn't make it!

0 XP

 
#7 9 years ago

Well, will it work with the misplaced else, cause now I can't find where It went....lol.

Edit: I may have found the place for it.

declare ( FLOAT, "msg_state" );

task ( "ToggleState" ) {

affect ( "sokkalockstate", FLUSH ) { if ( get );

// Macro "float" here owns the next 6 items: set ( "SET_PARM1", "0" ); set ( "msg_state", "0" );

affect ( "sokkatele_trigger", FLUSH ) { set ( "SET_TARGET", "sokkatele" ); }

affect ( "sokkatele_msg_trigger", FLUSH ) { set ( "SET_INACTIVE", "false" ); }

use ( "sokkalock" ); use ( "sokkalock_state" );

else ( ) { set ( "SET_PARM1", "1" ); set ( "msg_state", "1" );

affect ( "sokkatele_trigger", FLUSH ) { set ( "SET_TARGET", "sokkatele_locked" ); }

affect ( "sokkatele_msg_trigger", FLUSH ) { set ( "SET_INACTIVE", "true" ); }

use ( "sokkalock" ); use ( "sokkalock_state" ); } } }

do ( "ToggleState" ); wait ( "ToggleState" ); if ( get );

// Macro "float" here owns the next 1 items: use ( "sokkalock_lock" );

else ( ) { use ( "sokkalock_unlock" ); }

free ( "msg_state" );

That look right?




Guest

I didn't make it!

0 XP

 
#8 9 years ago

Well, the if get messed up