Fixed function call in basicDataStorage and added a missing function from the local version

This commit is contained in:
Robert MacGregor 2016-03-17 02:43:56 -04:00
parent 37928a28e2
commit ee56603062
3 changed files with 40 additions and 28 deletions

View file

@ -182,6 +182,19 @@ function getFileNameFromString(%string)
return getSubStr(%string,getSubStrPos(%string, "/", getSubStrOccurances(%string, "/")-1)+1,strLen(%string));
}
//------------------------------------------------------------------------------
function subWordCapitalize(%string)
{
%current = "";
for (%i = 0; %i < getWordCount(%string); %i++)
{
%word = getWord(%string, %i);
%word = strUpr(getSubStr(%word, 0, 1)) @ getSubStr(%word, 1, strLen(%word));
%current = %current SPC %word;
}
return trim(%current);
}
//-------------------------------------------------------------------------------
function getFileExtensionFromString(%string)
{

View file

@ -105,7 +105,7 @@ function BasicDataParser::load(%this, %file)
}
// Note: I got lazy here, just don't have semicolons in your data entries..
%semiPos = strStr(%currentLine,";");
if (%semiPos == -1 || getSubStrOccurance(%currentLine,";") > 1)
if (%semiPos == -1 || getSubStrOccurances(%currentLine,";") > 1)
{
error("basicDataStorage.cs: Unable to read entry for block" SPC %currentBlock.Name @ " in file" SPC %file @ "!");
%isProcessingBlock = false;

View file

@ -3,8 +3,7 @@
// Shared Functions for T2Bol
// Copyright (c) 2012 The DarkDragonDX
//==============================================================================
exec("scripts/modScripts/shared/Array.cs");
exec("scripts/modScripts/shared/StringFunctions.cs");
exec("scripts/modScripts/shared/fileProcessing.cs");
exec("scripts/modScripts/shared/basicDataStorage.cs");