Results 1 to 9 of 9

Thread: Reborn EXCEPTION: BulletAttack

  1. #1

    Default Reborn EXCEPTION: BulletAttack

    OK before I go into a coma from smoking another 3 packs would someone please tell me just what this is and how can I fix it without pull reborn patch off my server?

    Reborn EXCEPTION: BulletAttack - PointersSet! EXCEPTION CODE: -1073741819
    Reborn EXCEPTION: BulletAttack - GetMuzzle&Trace! EXCEPTION CODE: -1073741819

    it happens when I use this script but I run the same thing on 5 other maps with no trouble at all they just have different origins. I think it has something to do with whats in red but not sure.

    Code:
    main:
    
    
    thread mg42_gun
    
    local.master= spawn ScriptMaster
    local.switch = spawn script_model model models/animate/alarmswitch.tik origin ( 2620 2860 75 ) angle ( -90 )
    local.trigger = spawn trigger_use origin local.switch.origin
    
    end
    
    
    mg42_gun:	
    
    
    	local.switch = spawn script_model model models/animate/alarmswitch.tik origin ( -1170.43 1644.34 143.87 ) angle (   0  ) //( 1610.54 -383.13 426.13 ) angle (  0 0 0 )
    	local.trigger = spawn trigger_use origin local.switch.origin
    	local.switch anim turnoff
    
    	while(1)
    	{
        	local.trigger waittill trigger
        	local.trigger nottriggerable
        	
    
    	// animates trigger switch
        	local.switch anim turnon
        	local.switch playsound alarm_switch
        	local.switch playsound alarm_siren
        
        	wait 1
    
        	//Spawn mg     
        	waitthread turret
         
        	/// Wait 30 seconds before able to release again
        	wait 60
        
    	//resets trigger
        	local.switch anim turnoff
        	local.switch playsound alarm_switch    
        	local.trigger triggerable
    	}
    
    	end
    
    turret:
    
    //  Set Up for turret shooting at players 
    
    local.turret = spawn "models/statweapons/mg42_gun.tik" "targetname" "turret"
    local.turret.origin = ( -1060.04 1346.04 106.47 ) 
    local.turret.angles = ( 0 -95 0  )
    //local.turret yawCenter 25
    //local.turret maxyawoffset 25
    
     	
        $turret setPlayerUsable 0
        $turret turnspeed 150
        $turret burstFireSettings  0 .13 0 0
    
        while(1)
         { 
    
    
            for (local.i = 1; local.i <= $player.size; local.i++) 
            {
                
    keepontarget:
    
                wait .1
                if (($turret cansee $player[local.i] 50 2928) && (isAlive $player[local.i]) && $player[local.i] !=NULL)
                 {
                    
                    $turret setaimtarget $player[local.i]
                    if ($turret cansee $player[local.i] 50 2928)
                     {
                       wait 2
                       $turret startfiring
                       wait 3
                       $turret stopfiring
                       $turret setaimtarget NULL
                        $turret stopfiring
                        wait 1
                        $turret remove
                       
                    } 
                    goto gun 
    
                    
                }
            }
        wait .1
        }
    end

  2. #2
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Bullettattack() is a function that gets triggered when you fire a weapon.
    I can't see why it would crash using your script. When you take out that script it works fine?
    Can you try and see what the value of "$player[local.i]" is. Try printing it to console or something so you can test it out.
    Also what if you modify the 2nd and 3rd value; does it still crash?

  3. #3

    Default

    Quote Originally Posted by James View Post
    Can you try and see what the value of "$player[local.i]" is. Try printing it to console or something so you can test it out.
    Don't have a clue how to do that.

    Yes it runs fine as long as I don't use the trigger. I'll try changing only the 2nd and 3rd values I thought all 4 had to be the same.

  4. #4

    Default

    OK here's something that strange if I activate it and get in front of mg32 it crashes but if I go into spec after I trigger it then shoots at me while in spec and doesn't crash but on the other 4 maps I use this on it works perfect. maybe it just don't like destroyed village. Screw it not worth the effort for 1 map, I just hate not knowing whats up with it.

  5. #5

    Default

    Man what a dumb ass I am I went back to the post where Zappa told me the script for this and some where along the way some things wasn't the same as his script. I used his script and it works great. his script has this

    if (($turret cansee $player[local.i] 360 1440) && (isAlive $player[local.i]) && $player[local.i].dmteam != "spectator")

    //$turret loopsound turret_alarm;
    $turret setaimtarget $player[local.i];
    if ($turret cansee $player[local.i] 50 1440)
    {
    so it was the 1st and 3rd values along with me leaving out && $player[local.i].dmteam != "spectator") part which is way it worked when in spec. Damn I hate getting old you'd think after 61 years I'd learn.

  6. #6
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Haha. Glad you figured it out. lol. We all have those moments sometimes.

  7. #7

    Default

    Nope that wasn't it I forgot the most important thing when testing mods, turn off all other mods till it works, after I did that I think I found out what it is. In the above script I have "for (local.i = 1; local.i <= $player.size; local.i++) " now in my door locked teleport script I have this "for (local.i=1;local.i<=$door_locked.size;local.i++)" So I need to come up with another way of doing one of the scripts.

  8. #8

    Default

    lmao that's not it either sometimes it works right next time it don't, it works on V2 - The Hunt - Stalingrad and M2L1 perfect every time DV and Algiers works couple of time then starts crashing server.

  9. #9

    Default

    I have change a little the script to see if works better.

    Try like this:


    main:


    thread mg42_gun

    local.master= spawn ScriptMaster
    local.switch = spawn script_model model models/animate/alarmswitch.tik origin ( 2620 2860 75 ) angle ( -90 )
    local.trigger = spawn trigger_use origin local.switch.origin

    end


    mg42_gun:


    local.switch = spawn script_model model models/animate/alarmswitch.tik origin ( -1170.43 1644.34 143.87 ) angle ( 0 ) //( 1610.54 -383.13 426.13 ) angle ( 0 0 0 )
    local.trigger = spawn trigger_use origin local.switch.origin
    local.switch anim turnoff

    while(1)
    {
    local.trigger waittill trigger
    local.trigger nottriggerable


    // animates trigger switch
    local.switch anim turnon
    local.switch playsound alarm_switch
    local.switch playsound alarm_siren

    wait 1

    //Spawn mg
    waitthread turret

    /// Wait 30 seconds before able to release again
    wait 60

    //resets trigger
    local.switch anim turnoff
    local.switch playsound alarm_switch
    local.trigger triggerable
    }

    end

    turret:

    // Set Up for turret shooting at players

    local.turret = spawn "models/statweapons/mg42_gun.tik" "targetname" "turret"
    local.turret.origin = ( -1060.04 1346.04 106.47 )
    local.turret.angles = ( 0 -95 0 )
    //local.turret yawCenter 25
    //local.turret maxyawoffset 25


    $turret setPlayerUsable 0
    $turret turnspeed 150
    $turret burstFireSettings 0 .13 0 0

    thread detect_player_close


    end

    detect_player_close:

    while($turret != NULL)
    {


    for (local.i = 1; local.i <= $player.size; local.i++)
    {

    local.player = $player[local.i]

    if(local.player == NULL)
    end

    wait .1
    if (($turret cansee local.player 50 2928) && (isAlive local.player) && local.player.dmteam != "spectator")
    {

    $turret setaimtarget local.player
    if ($turret cansee local.player 50 2928)
    {
    wait 2
    $turret startfiring
    wait 3
    $turret stopfiring
    $turret setaimtarget NULL
    $turret stopfiring
    wait 1
    $turret remove

    }



    }
    }
    wait .1
    }

    end

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •