SandMouseAnarchy Posted March 7, 2019 Posted March 7, 2019 I have a quest script that checks if the player has grenades equipped, and i need to be able to tell how many grenades are in the invintory and do stuff if grenades = > 1 and if grenades = < 1, but i cant get the script to compile, i keep getting an error saying "No variable alternative at imput '=' "... This is what i have so far...Scriptname Weapon_SM_Equip_Grenades extends Quest Armor Property GrenadeBelt Auto Weapon Property FragGrenade Auto var amount Event OnQuestInit() RegisterForRemoteEvent(Game.GetPlayer(), "OnItemEquipped") EndEvent Event Actor.OnItemEquipped(Actor akActor, Form akBaseObject, ObjectReference akReference) If akActor == Game.GetPlayer() If (akActor.GetEquippedItemType(2) == 10) Debug.notification("frag grenades equipped") UnregisterForRemoteEvent(akActor, "OnItemEquipped") Amount = (Game.GetPlayer().GetItemCount(FragGrenade)) If Amount = > 1 Debug.Notification("grenades = >1") elseif Amount = < 1 Debug.Notification("grenades = <1") EndIf RegisterForRemoteEvent(akActor, "OnItemEquipped") EndIf EndIf EndEvent Can anyone help with this one? ^.^
IsharaMeradin Posted March 7, 2019 Posted March 7, 2019 The operator syntax is as follows: >= greater than or equal to<= less than or equal to The way you have it, papyrus does not understand what you are trying to do.
SandMouseAnarchy Posted March 7, 2019 Author Posted March 7, 2019 ooooooooooooooh, so ">=" not just ">", excellent, Thankyou IsharaMeradin :)
Recommended Posts