Falcedon Posted January 13, 2015 Share Posted January 13, 2015 I'm trying to add this script to a wrench activator and no matter what i've tried the script won't compile. Can you see anything wrong with it? scn SHWrenchCreateScript short Button begin OnActivate if IsActionRef playerShowMessage SHWrenchMessageendif end BEGIN MenuMode 1001 set Button to GetButtonPressed if ( Button == 0 )player.GetItemCount PHAssaultCarbineBody == 1player.GetItemCount PHAssaultCarbineClip == 1player.GetItemCount PHAssaultCarbineSilencer == 1player.AddItem WeapSHAssaultCarbine 1SetDestroyed 1endif END Link to comment Share on other sites More sharing options...
DrakeTheDragon Posted January 13, 2015 Share Posted January 13, 2015 The part inside "if ( Button == 0 )" and its "endif" makes no sense programmatically and syntactically.You're using "get" functions and a comparison inside a condition but without an "if". What are those lines meant to do anyways?"player.GetItemCount" returns the count. It cannot be used to "set" it.And what purpose do you compare the result with "1" for? What should it do when it is "1"? Or is it intended to only "AddItem" the "WeapSHAssaultCarbine" to the player, "if" all 3 "GetItemCount" return "1"?Then you need to at least put them inside an "if" condition and the "AddItem" inside the result block. Like so: if (player.GetItemCount PHAssaultCarbineBody == 1) && (player.GetItemCount PHAssaultCarbineClip == 1) && (player.GetItemCount PHAssaultCarbineSilencer == 1) player.AddItem WeapSHAssaultCarbine 1 endif Link to comment Share on other sites More sharing options...
Falcedon Posted January 13, 2015 Author Share Posted January 13, 2015 thak you soo much im new to scripting so i used the scripts in the geck already to help me but you obviously were more help so thank you :) Link to comment Share on other sites More sharing options...
Recommended Posts