Method IsValidScriptName
IsValidScriptName(string?, bool)
Validates a script name against engine constraints.
public static bool IsValidScriptName(this string? scriptName, bool allowEmpty)
Parameters
scriptNamestringThe script name to validate.
allowEmptyboolIf true, an empty or null name is allowed.
Returns
- bool
True if the name is valid, otherwise false.
Remarks
The following constraints apply to script names:
- Script must be <=16 characters.
- Scripts must only use alphanumeric characters (Aa-Zz, 0-9), underscores (_), or hyphens (-).
- Scripts must not use reserved names: GameEventScriptName or NWNXEventScriptName.