Script CTD help

Post » Tue May 17, 2011 12:18 am

I'm getting the occasinal CTD when drawing my weapon and holding a torch at the same time. I think it has to do with the fact that these scripts I will post are identical to OOO's scripts. Maybe because I have imported scripts from OOO into the Bashed Patch. Maybe not. I'm not sure. But if someone could take a look at these scripts and tell me if they see anything that would cause CTD's, I'd appreciate it. Here are the scripts:

scn droptorchMalonn; optimized & modified by dev_akm to block torch messageshort weapshort Cavebegin menumode 1	if (player.getitemcount torch05 > 0)		Message " "		Message " "		player.removeitem torch05 1	endifendbegin menumode 1008	if (player.getitemcount torch05 > 0)		Message " "		Message " "		player.removeitem torch05 1	endifendbegin gamemode	if TorchRetrieveMalonn		set TorchRetrieveMalonn to 0	endif	if (Player.IsWeaponOut != 1)		Return	else		if (player.getEquipped torch02)			if player.isshieldout				Message " "				Message " "				Player.additem torch06 1				Player.equipitem torch06				Player.Drop torch06 1				Player.RemoveItem Torch02 1			elseif (player.GetWeaponAnimType > 1)				Message " "				Message " "				Player.additem torch06 1				Player.equipitem torch06				Player.Drop torch06 1				Player.RemoveItem Torch02 1			endif		endif	endifend

This script is attached to a torch. Torch02 editor ID.

scn retrievetorchMalonn; optimized & modified by dev_akm to block torch messagefloat torchburnoutshort startershort armedfloat tempfloat torchxfloat torchyfloat torchzfloat torchfxfloat torchfyfloat torchfzref lightrefbegin gamemode	SetOwnership	if getdisabled		lightref.disable		enable		activate player	else		if (starter == 0)			set temp to getpos z + 80			SetPos z, temp			set lightref to placeatme torch03light			set starter to 1		endif	endif	set torchburnout to ( torchburnout + getsecondspassed )	set torchx to getpos x 	set torchy to getpos y	set torchz to getpos z	lightref.SetPos x, torchx	lightref.SetPos y, torchy	lightref.SetPos z, torchz	if (hasflames == 0)		lightref.disable		removeflames		disable	elseif (torchburnout >= 250)		lightref.disable		removeflames		disable	endifEndbegin onactivate player	activate	set TorchRetrieveMalonn to 1	set starter to 0	lightref.disable	set torchburnout to 0Endbegin OnAdd player 	if (getdisabled == 0)		Message " "		Message " "		player.additem torch02 1		If (player.getequipped torch02 == 0)			set armed to player.isweaponout			if (armed == 0) || (player.GetWeaponAnimType < 2 && player.IsShieldOut == 0)				Message " "				Message " "				player.equipitem torch02			endif		endif	endifEnd

This is attached to a torch as well. Torch05 editor ID

scn droptorch2Malonnref lightrefBEGIN ONLOADif getdisabled == 0	disable	set lightref to placeatme torch05endifEnd

And this is attached to a torch - torch06 editor ID.
User avatar
Lexy Corpsey
 
Posts: 3448
Joined: Tue Jun 27, 2006 12:39 am

Post » Tue May 17, 2011 1:32 am

Whoops! Posted in the wrong forum. Sorry about that. I genuine accident. Maybe a moderator can move it to the CS forums.
User avatar
Michelle Serenity Boss
 
Posts: 3341
Joined: Tue Oct 17, 2006 10:49 am

Post » Tue May 17, 2011 8:20 am

Bump.
User avatar
Catharine Krupinski
 
Posts: 3377
Joined: Sun Aug 12, 2007 3:39 pm

Post » Tue May 17, 2011 1:25 am

Bump again.
User avatar
luke trodden
 
Posts: 3445
Joined: Sun Jun 24, 2007 12:48 am

Post » Tue May 17, 2011 3:12 am

Alright, I'm beginning to think no one spots any obvious errors with the scripts...
User avatar
sarah
 
Posts: 3430
Joined: Wed Jul 05, 2006 1:53 pm


Return to IV - Oblivion