diff --git a/cinera/cinera.c b/cinera/cinera.c index 833dcff..7748f74 100644 --- a/cinera/cinera.c +++ b/cinera/cinera.c @@ -17,7 +17,7 @@ typedef struct version CINERA_APP_VERSION = { .Major = 0, .Minor = 6, - .Patch = 2 + .Patch = 3 }; #include // NOTE(matt): varargs @@ -3935,7 +3935,7 @@ RecordTag: return RC_INVALID_TEMPLATE; } - if(FoundSearch) + if(!HaveErrors && FoundIncludes && FoundSearch) { Template->Metadata.Validity |= PAGE_SEARCH; } @@ -3949,7 +3949,8 @@ RecordTag: { if(Type == TEMPLATE_SEARCH && !(Template->Metadata.Validity & PAGE_SEARCH)) { - CopyStringToBuffer(&Errors, "Search template %s must include one tag\n", Template->File.Path); + if(!FoundIncludes) { CopyStringToBuffer(&Errors, "%sSearch template%s must include one tag\n", ColourStrings[CS_ERROR], ColourStrings[CS_END]); }; + if(!FoundSearch) { CopyStringToBuffer(&Errors, "%sSearch template%s must include one tag\n", ColourStrings[CS_ERROR], ColourStrings[CS_END]); }; fprintf(stderr, "%s", Errors.Location); DeclaimBuffer(&Errors); FreeTemplate(Template); @@ -3957,10 +3958,10 @@ RecordTag: } else if((Type == TEMPLATE_PLAYER || Type == TEMPLATE_BESPOKE) && !(Template->Metadata.Validity & PAGE_PLAYER)) { - if(!FoundIncludes){ CopyStringToBuffer(&Errors, "Player template %s must include one tag\n", Template->File.Path); }; - if(!FoundMenus){ CopyStringToBuffer(&Errors, "Player template %s must include one tag\n", Template->File.Path); }; - if(!FoundPlayer){ CopyStringToBuffer(&Errors, "Player template %s must include one tag\n", Template->File.Path); }; - if(!FoundScript){ CopyStringToBuffer(&Errors, "Player template %s must include one tag\n", Template->File.Path); }; + if(!FoundIncludes){ CopyStringToBuffer(&Errors, "%s%slayer template%s must include one tag\n", ColourStrings[CS_ERROR], Type == TEMPLATE_BESPOKE ? "Bespoke p" : "P", ColourStrings[CS_END]); }; + if(!FoundMenus){ CopyStringToBuffer(&Errors, "%s%slayer template%s must include one tag\n", ColourStrings[CS_ERROR], Type == TEMPLATE_BESPOKE ? "Bespoke p" : "P", ColourStrings[CS_END]); }; + if(!FoundPlayer){ CopyStringToBuffer(&Errors, "%s%slayer template%s must include one tag\n", ColourStrings[CS_ERROR], Type == TEMPLATE_BESPOKE ? "Bespoke p" : "P", ColourStrings[CS_END]); }; + if(!FoundScript){ CopyStringToBuffer(&Errors, "%s%slayer template%s must include one tag\n", ColourStrings[CS_ERROR], Type == TEMPLATE_BESPOKE ? "Bespoke p" : "P", ColourStrings[CS_END]); }; fprintf(stderr, "%s", Errors.Location); DeclaimBuffer(&Errors); FreeTemplate(Template);