Ok, I was just making sure there wasn't something I was unaware of..
Well, thanks, this clarified the situation for me, I'll try to remember it, but, years of programming one way, well, it's a hard habit to break..

scn aaaRecycle; A function for deleting game items.ref Itemlong ItemValuelong FinalValuelong Amountlong PlayerHaslong PayOutBegin Function { Item, Amount } ; Get Item Value Set ItemValue to ( GetFullGoldValue Item ) Set FinalValue to (ItemValue * aaaAdvancedMagecraftQST.RecycleGoldCost) ; Give 1 Gold For Items Of Value (If Balance Options Reduce Them To 0) if (ItemValue > 0 && FinalValue =http://forums.bethsoft.com/index.php?/topic/1170916-beta-oblivion-script-extender-obse-0020/= 0 && aaaAdvancedMagecraftQST.RecycleGoldCost != 0) Set FinalValue to 1 endif Set PlayerHas to (Player.GetItemCount Item) if (Amount> PlayerHas) Set Amount to (PlayerHas) endif MessageEx "Recycling: %n - Amount: %0.f" Item Amount ; Remove Items (It's impossible for no item to reach this function, no if block necessary, there is at least one..) Set PlayerHas to PlayerHas - Amount while (Player.GetItemCount Item > PlayerHas) Player.RemoveItemNS Item 1 loop ; Give Gold (If applicable) ; I should probably wrap this in an if block... Set PayOut to (FinalValue * Amount) Player.AddItem Gold001 PayOut <--- This is the message I refer to above, the gold added message.. I got this, it must have ran to have gotten here..End
long psValue string_var sText. . .IniReadString psValue psFile psSection psKey psNadaset sText to ToOBSE psValue
scn aaaRenameref Itemref ItemClonestring_var OldNamestring_var NewNameshort NameChangedshort NameBlankBegin Function { Item, NewName } MessageEx "NewName: %z" NewName ; Store Current Name Let OldName := GetName Item ; Just added this, it works too.. MessageEx "OldName: %z" OldName ; Check If Name Is Blank Let NameBlank := sv_Compare "%e" NewName ; Check If Name Has Changed Let NameChanged := sv_Compare OldName NewName Message "NameBlank: %0.f" NameBlank Message "NameChanged: %0.f" NameChanged if (NameBlank == -2 && NameChanged == -2) Set ItemClone to (CloneForm Item) SetNameEx ItemClone NewName Call zzzUpdateContainer Player Item ItemClone Message "Item Renamed!" endif ; Cleanup Strings sv_Destruct OldName NewNameEnd;compares a string to a formatted string. ;Performs a case-insensitive comparison by default. ;Returns 0 if the strings are equal, ;1 if the string variable occurs alphabetically before the formatted string, ;-1 if the string variable occurs alphabetically after the formatted string, ;or -2 if the comparison fails.
;compares a string to a formatted string. ;Performs a case-insensitive comparison by default. ;Returns 0 if the strings are equal, ;1 if the string variable occurs alphabetically before the formatted string, ;-1 if the string variable occurs alphabetically after the formatted string, ;or -2 if the comparison fails.
scn aaaRenameref Itemref ItemClonestring_var NewNameBegin _Function { Item, NewName } if (NewName) ; variable contains something if eval ! ( $(NewName) == "" ) ; contents are not an empty string if eval ! ( $(NewName) == (GetName item) ) ; new name is not the same as old name let ItemClone := (CloneForm Item) SetName ItemClone $(NewName) Call zzzUpdateContainer Player Item ItemClone endif endif endifEnd
scn aaaRenameref Itemref ItemClonestring_var NewNameBegin _Function { Item, NewName } if (NewName) ; variable contains something if eval ! ( $(NewName) == "" ) ; contents are not an empty string if eval ! ( $(NewName) == (GetName item) ) ; new name is not the same as old name let ItemClone := (CloneForm Item) SetName ItemClone $(NewName) Call zzzUpdateContainer Player Item ItemClone endif endif endifEnd
if eval ! ( $(NewName) == "" )to
if eval NewName != ""as I find the second quite a bit simpler to read
if (NewName) ; variable contains something if eval ! ( $(NewName) == "" )can be shortended to
if eval (sv_Length NewName) > 0 ; variable contains at least one character
if eval ! ( $(NewName) == "" )to
if eval NewName != ""as I find the second quite a bit simpler to read
if (NewName) ; variable contains something if eval ! ( $(NewName) == "" )can be shortended to
if eval (sv_Length NewName) > 0 ; variable contains at least one character