Deleted518329User Posted September 7, 2009 Share Posted September 7, 2009 I have 3 scripts, they all have basically the same things except that different items are added each time. It activates when a door is activated and all was working fine.To get the 3rd script working faster I copyed and pasted script number 2, but for some reason number 2 works but I get the error messege ' mismatched begin / end function on line 17, but both scripts are the same at the moment, so my question is, how can two scipts the same work fine but the 3rd one exactly the same doesnt work when its the same as the other 2? Heres the script ScriptName 01generatepower3 short buttonshort reactivate ; set to 1 to trigger automatic reactivationshort saved ; set to 1 first time player activates Begin OnActivate showMessage 00000powermessege3 endifend Begin Gamemode (LINE 17) set button to getbuttonpressed if button > -1 if button == 4Player. Additem 1powervortexunstable 1Player. Additem Ammoalienpowercell 9000000 activate player else if button == 0 Player. Additem 1powerenergysound 1Player. Additem 1powerelectricshock 1Player. Additem Ammoalienpowercell 9000000 activate player elseif button == 1 Player. Additem 1powerenergygravity 1Player. Additem 0GRAVITYLEVI 1Player. Additem Ammoalienpowercell 9000000 activate player elseif button == 2 Player. Additem 0rasiationnuclearesistance 1Player. Additem 1powerenergynuclear 1Player. Additem Ammoalienpowercell 9000000activate playerelseif button == 3 Player. Additem 1powersrtenth 1activate playerelseif button == 5 Player. Additem 2powerltelekenesis 1Player. Additem 3telekenesis 1Player. Additem 2powerltelekenesisPIN 1Player. Additem Ammoalienpowercell 9000000activate player elseif button == 6Player. Moveto 0selectback endif set reactivate to 1 endif endif Link to comment Share on other sites More sharing options...
steelplate Posted September 7, 2009 Share Posted September 7, 2009 Is that all the script? Or did you cut off the END at the bottom? Link to comment Share on other sites More sharing options...
Holty07 Posted September 8, 2009 Share Posted September 8, 2009 Yeah you definitely forgot the END at the bottom. That's what that error is telling you! Link to comment Share on other sites More sharing options...
AlexxEG Posted September 8, 2009 Share Posted September 8, 2009 Copy and Paste this script. It's a corrected version of your own^^ ScriptName 01generatepower3 short button short reactivate ; set to 1 to trigger automatic reactivation short saved ; set to 1 first time player activates Begin OnActivate showMessage 00000powermessege3 end Begin Gamemode set button to getbuttonpressed if ( button == 0 ) Player.Additem 1powerenergysound 1 Player.Additem 1powerelectricshock 1 Player.Additem Ammoalienpowercell 9000000 activate player elseif ( button == 1 ) Player.Additem 1powerenergygravity 1 Player.Additem 0GRAVITYLEVI 1 Player.Additem Ammoalienpowercell 9000000 activate player elseif ( button == 2 ) Player.Additem 0rasiationnuclearesistance 1 Player.Additem 1powerenergynuclear 1 Player.Additem Ammoalienpowercell 9000000 activate player elseif ( button == 3 ) Player.Additem 1powersrtenth 1 activate player elseif ( button == 4 ) Player.Additem 1powervortexunstable 1 Player.Additem Ammoalienpowercell 9000000 activate player elseif ( button == 5 ) Player.Additem 2powerltelekenesis 1 Player.Additem 3telekenesis 1 Player.Additem 2powerltelekenesisPIN 1 Player.Additem Ammoalienpowercell 9000000 activate player elseif ( button == 6 ) Player.Moveto 0selectback set reactivate to 1 endif end Link to comment Share on other sites More sharing options...
Recommended Posts