Attract-Mode Support Forum

Attract-Mode Support => Scripting => Topic started by: popoklo on November 26, 2017, 05:09:22 AM

Title: Getting first Char and ignoring "The" Titles for everyone
Post by: popoklo on November 26, 2017, 05:09:22 AM
Perhaps someone is interested in getting the First Character of a Title ignoring "The":

Code: [Select]
function FirstChar()
{
local strip;

if (fe.game_info(Info.Title).slice(0,3) == "The")
{
strip = fe.game_info(Info.Title).slice(4,5);
// print("cut\n");
}
else
{
            strip = fe.game_info(Info.Title).slice(0,1);
//     print(fe.game_info(Info.Title).slice(0,3) + " nocut\n");
}
       
        return strip;
}