Swe-DivX Posted March 30, 2022 Posted March 30, 2022 I have asked this before and cant find the topic. I want to remove 2 first letters in a string "ABC" and have "C"
blank_v Posted March 30, 2022 Posted March 30, 2022 Scriptname StringUtil Hidden ; return the length of the string int Function GetLength(string s) global native ; returns a single character string with the character at index string Function GetNthChar(string s, int index) global native String LetterThree = StringUtil.GetNthChar( SomeString, 3 ) //Edit -> I'm idiot... index start from 0 so to get C from "ABC" You need to get index 2... saying just in case xD should be 2 not 3 ;x... or ; returns a substring of the specified string starting at startIndex and going for len characters ; or until the end of the string. Default len of 0 means for the entire string string Function Substring(string s, int startIndex, int len = 0) global native
Swe-DivX Posted March 31, 2022 Author Posted March 31, 2022 ;Actor ID int Function GetActorModID(actor akref) ;ActorBase ActorRefBase = akref.GetLeveledActorBase() int ID = akref.GetFormID() ID = Math.LogicalAnd(ID, 0x00ffffff) return ID EndFunction trying to figure out how to flip the ID and point to an actor's formid, but it's over my head. Its for Sexlife7.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.