Difference between revisions of "GetModAuthor - Game"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>Wafflesalot
(Created page with "Category:Scripting Category:Papyrus Category:SKSE '''SKSE Member of:''' Game Script Returns the Mod Author of the specified mod Index. (This function requires...")
 
imported>Wafflesalot
m (→‎Examples: placed missing EndIf)
 
Line 31: Line 31:
Else
Else
Debug.Trace("The Author of this mod did no leave his name.")
Debug.Trace("The Author of this mod did no leave his name.")
EndWhile
EndIf
EndFunction
EndWhile
EndFunction
</source>
</source>


== Notes ==
== Notes ==

Latest revision as of 01:14, 27 February 2013

SKSE Member of: Game Script

Returns the Mod Author of the specified mod Index. (This function requires SKSE)

Syntax[edit | edit source]

string Function GetModAuthor(int modIndex) native global

Parameter[edit | edit source]

  • modIndex = index of the mod.

Return Value[edit | edit source]

Returns the mod author of the specified index.

Examples[edit | edit source]

int Numberofmods
String NameofAuth

Function ModAuthor()
	Numberofmods = Game.GetModCount() ;The number of active mods.
	while NumberofMods
		NumberofMods -= 1
		NameofAuth = Game.GetModAuthor(NumberofMods) ; If a Author is specified then it will return a name if not will be DEFAULT
		If(NameofAuth != "DEFAULT")
			Debug.Trace("The Author of this mod is " + NameofAuth)
		Else
			Debug.Trace("The Author of this mod did no leave his name.")
		EndIf
	EndWhile	
EndFunction

Notes[edit | edit source]

  • A fair majority of mods do not have a specified author and as such many mods will return a "DEFAULT" string.

See Also[edit | edit source]