Difference between revisions of "GetFileSize"
Jump to navigation
Jump to search
imported>Low Post (New page: A command for Pluggy. '''Syntax:''' (Size:long) GetFileSize (FileName)StringID:long ''RootID:short'' GetFileSize returns the file size in Bytes of Filename. ==Not...) |
imported>Low Post m (added the variable declaration to the example script) |
||
Line 18: | Line 18: | ||
Quest Script which returns if the player uses a german copy of Oblivion. Only works with a fully patched (v1.2.0416) Oblivion. | Quest Script which returns if the player uses a german copy of Oblivion. Only works with a fully patched (v1.2.0416) Oblivion. | ||
<pre>scn LanguageCheckScript | <pre>scn LanguageCheckScript | ||
short IsGerman | |||
Begin Gamemode | Begin Gamemode |
Latest revision as of 09:46, 23 March 2011
A command for Pluggy.
Syntax:
(Size:long) GetFileSize (FileName)StringID:long RootID:short
GetFileSize returns the file size in Bytes of Filename.
Notes:[edit | edit source]
- If the file cannot be found, it returns -1.
- If the file size is bigger than 2GB, it returns -2.
- RootID specifies in which folder the search should be proceeded. Default is 0.
- 0: "My Documents\My Games\Oblivion\Pluggy\User Files\"
- 1: Oblivion Data folder.
- 2: Oblivion main folder.
- If you want to modify a string from another mod, you will need to set the Global flag to 1. If Global is 0 or unset the function will fail. If the string is protected the function will fail.
Example:[edit | edit source]
Quest Script which returns if the player uses a german copy of Oblivion. Only works with a fully patched (v1.2.0416) Oblivion.
scn LanguageCheckScript short IsGerman Begin Gamemode SetString -2000 "Oblivion.esm" 0 set IsGerman to ( ( ( GetFileSize -2000 1 ) == 247876643 ) || ( ( GetFileSize -2000 1 ) == 278038032 ) ) if ( IsGerman ) Message "Du verwendest eine deutsche Version von Oblivion." else Message "You use a non-German (probably English) copy of Oblivion." endif StopQuest LanguageCheck End