recon14192 Posted June 10, 2017 Share Posted June 10, 2017 I'm trying to add a fragment to a quest as the following if(Game.GetPlayer().ChangeHeadPart(BigBeard06, True) == 1) Game.GetPlayer().ChangeHeadPart(BigBeard06)EndIf I get this error cannot compare a void to a int (cast missing or types unrelated) What I'm trying to do is check to see if a certain head part is present. In C, I was taught that function will return a 0 or 1 if they do or do not run to their end. While I didn't see this on the wiki, I thought I might at least try this to see if it worked in papyrus. I see now this isn't the case since it's telling me that the ChangeHeadPart is a void type function. Now I'm looking for guidance on a way to do a check here. I'm to trying to make the game say "Ok this head part isn't here so let's add it." If any of you know if there is a way to do this check please let me know. Link to comment Share on other sites More sharing options...
shavkacagarikia Posted June 10, 2017 Share Posted June 10, 2017 (edited) You cannot check if player has specific head part with vanilla papyrus. You need F4SE which has function GetHeadParts returning array of headparts, then you can check if your needed headpart is in this array.Like this: Headparts[] headparts = Game.GetPlayer().GetActorBase().GetHeadParts()If headparts.Find(BigBeard06) <0 Game.getplayer().changeHeadPart(BigBeard06)Endif Edited June 10, 2017 by shavkacagarikia Link to comment Share on other sites More sharing options...
Recommended Posts