script problem


(garv284) #1

I have a constructable bridge in my map and i think “<- keyword” everything is right with it. My problem is that when i test it out in ET i get back an error that says "G_Script_Parse (): (Line 9): unknown event: bridgefinal " or something to that effect. now i have that as the script routine that runs the construction and destruction of the bridge and stuff and i have bridgefinal labeled as the scriptname in the func_constructaible entity, any ideas?


(DaRkFiRe) #2

Post your script here please.


(garv284) #3

oh sorry forgot to include that, my bad.

game_manager {
        
         spawn {
         
         }

//Allied Bridge Construction

bridgefinal {
    
               spawn {
                    wait 200
                    constructible_class 3
               
                    setstate constage1 invisible
                    setstate constage2 invisible

                    setstate con_materials default
                    setstate con_materials2 default
                    setstate construction_clip default
                    setstate construction_clip2 default

               }


               //First Phase

               buildstart stage1 {
                   
                    wm_announce "The allies started bridge construction!"
                    setstate constage1 underconstruction
               }
                  
               built stage1 {

                    setstate con_materials2 invisible
                    setstate construction_clip2 invisible
                    wm_announce "Bridge constructed!"
               }
       
               decayed stage1 {
        
                    setstate con_materials default
                    setstate construction_clip2 default

               }
   
               death {
        
                    setstate con_materials default
                    setstate construction_clip2 default
                    wm_announce "The bridge has been destroyed!"
 
              }
              

              //Secon Phase

              buildstart final {
        
                    wm_announce "Bridge is being finalized"
                    setstate constage2 underconstruction
              }

              built final {
        
                    setstate con_materials2 invisible
                    setstate construction_clip invisible
                    wm_announce "Bridge completed!"
              }
    
              decayed final {
        
                    setstate con_materials2 default
                    setstate construction_clip default                  
              }
    
              destroyed final {
        
                    setstate con_materials2 default
                    setstate construction_clip default
                    setstate constage1 default
                    wm_announce "The bridge has been damaged!"
              }

      }
}         



(Mean Mr. Mustard) #4

gamemanger must be a self-contained routine (for lack of a better term)

So, move your last ‘}’ to before bridgefinal and you’ll be all set to go. The way you have it, you are trying to define a routine ‘bridgefinal’ inside of gamemanager and ‘bridgefinal’ is not a valid routine name…

game_manager { 
        
         spawn { 
          
         } 
}

//Allied Bridge Construction 

bridgefinal { 
    
               spawn { 
                    wait 200 
                    constructible_class 3 
                
                    setstate constage1 invisible 
                    setstate constage2 invisible 

                    setstate con_materials default 
                    setstate con_materials2 default 
                    setstate construction_clip default 
                    setstate construction_clip2 default 

               } 


               //First Phase 

               buildstart stage1 { 
                    
                    wm_announce "The allies started bridge construction!" 
                    setstate constage1 underconstruction 
               } 
                  
               built stage1 { 

                    setstate con_materials2 invisible 
                    setstate construction_clip2 invisible 
                    wm_announce "Bridge constructed!" 
               } 
        
               decayed stage1 { 
        
                    setstate con_materials default 
                    setstate construction_clip2 default 

               } 
    
               death { 
        
                    setstate con_materials default 
                    setstate construction_clip2 default 
                    wm_announce "The bridge has been destroyed!" 
  
              } 
              

              //Secon Phase 

              buildstart final { 
        
                    wm_announce "Bridge is being finalized" 
                    setstate constage2 underconstruction 
              } 

              built final { 
        
                    setstate con_materials2 invisible 
                    setstate construction_clip invisible 
                    wm_announce "Bridge completed!" 
              } 
    
              decayed final { 
        
                    setstate con_materials2 default 
                    setstate construction_clip default                  
              } 
    
              destroyed final { 
        
                    setstate con_materials2 default 
                    setstate construction_clip default 
                    setstate constage1 default 
                    wm_announce "The bridge has been damaged!" 
              } 

      } 



(garv284) #5

damn. those stupid little typos always get ya. thanks.