problem with this script

Post » Sun Aug 07, 2011 9:48 am

Spoiler

scn 1FletchingScript

short Selected

short num

begin OnAdd
if (1FletchingGot == 0)
Set 1FletchingGot to 1
MessageBox "You've got a fletching kit. You can now break down most equipment and make them into arrows. Remember that nothing but arrows will left. Don't put anything important in the Forge! To enchant arrows, put ingredients with proper Effect in Forge with them. You can drop multiple ingredient type to increase the effects. The higher your Armorer and Alchemy skills the better you will do."
endif
end

begin OnEquip
if (FletchingQST.Crafting == 0)
SetQuestObject Fletching 1
FletchingCNT.Activate player 1
set Selected to 1
Message "Warning!! All items will be destroyed, and magical Items cannot be broken down. Don't worry, your arrows are safe. Non Vanilla arrows will be lost."
set FletchingQST.DoOnce to 1
StartQuest 1FletchingQST ;calls the next script 1FletchingQSTScript
else
Message "You need to wait before you can fletch more arrows."
endif
end

begin MenuMode 1002
if (Selected == 1)
set Selected to 0
SetQuestObject Fletching 0
endif
end


keeps giving me unknown command FletchingGot line 8
I have 1FletchingGot set up as a global in the cs short and set to 0

what am I doing wrong and why is it ignoring the 1 in front of FletchingGot?
User avatar
FLYBOYLEAK
 
Posts: 3440
Joined: Tue Oct 30, 2007 6:41 am

Post » Sun Aug 07, 2011 3:27 pm

Variables should not start with numbers. It causes issues in the CS. You should simply be able to change the variable name and it will work properly. Also, remove the number before your script name. That's not good either.

Also, why make it a global variable?

scn FletchingScriptshort Selectedshort numshort FletchingGotbegin OnAdd	if (player.GetItemCount FletchingKit == 0)		Set FletchingGot to 1		MessageBox "You've got a fletching kit. You can now break down most equipment and make them into arrows. Remember that nothing but arrows will left. Don't put anything important in the Forge! To enchant arrows, put ingredients with proper Effect in Forge with them. You can drop multiple ingredient type to increase the effects. The higher your Armorer and Alchemy skills the better you will do."	endifendbegin OnEquip	if (FletchingQST.Crafting == 0)		SetQuestObject Fletching 1		FletchingCNT.Activate player 1		set Selected to 1		Message "Warning!! All items will be destroyed, and magical Items cannot be broken down. Don't worry, your arrows are safe. Non Vanilla arrows will be lost."		set FletchingQST.DoOnce to 1		StartQuest FletchingQST ;calls the next script FletchingQSTScript	else		Message "You need to wait before you can fletch more arrows."	endifendbegin MenuMode 1002	if (Selected == 1)		set Selected to 0		SetQuestObject Fletching 0	endifend

User avatar
Mason Nevitt
 
Posts: 3346
Joined: Fri May 11, 2007 8:49 pm

Post » Sun Aug 07, 2011 3:40 pm

Variables should not start with numbers. It causes issues in the CS. You should simply be able to change the variable name and it will work properly. Also, remove the number before your script name. That's not good either.

Also, why make it a global variable?

scn FletchingScriptshort Selectedshort numshort FletchingGotbegin OnAdd	if (player.GetItemCount FletchingKit == 0)		Set FletchingGot to 1		MessageBox "You've got a fletching kit. You can now break down most equipment and make them into arrows. Remember that nothing but arrows will left. Don't put anything important in the Forge! To enchant arrows, put ingredients with proper Effect in Forge with them. You can drop multiple ingredient type to increase the effects. The higher your Armorer and Alchemy skills the better you will do."	endifendbegin OnEquip	if (FletchingQST.Crafting == 0)		SetQuestObject Fletching 1		FletchingCNT.Activate player 1		set Selected to 1		Message "Warning!! All items will be destroyed, and magical Items cannot be broken down. Don't worry, your arrows are safe. Non Vanilla arrows will be lost."		set FletchingQST.DoOnce to 1		StartQuest FletchingQST ;calls the next script FletchingQSTScript	else		Message "You need to wait before you can fletch more arrows."	endifendbegin MenuMode 1002	if (Selected == 1)		set Selected to 0		SetQuestObject Fletching 0	endifend




Thanks you. will just do the aaa in front so its at the top then
User avatar
Mark
 
Posts: 3341
Joined: Wed May 23, 2007 11:59 am


Return to IV - Oblivion