more '\n' business

From /dev/humancontroller.
This commit is contained in:
Zack Middleton 2012-06-19 15:14:57 +00:00
parent 4cfbbe506c
commit 945f01d4af
12 changed files with 59 additions and 59 deletions

View file

@ -739,7 +739,7 @@ bot_synonymlist_t *BotLoadSynonyms(char *filename)
} //end while
if (numsynonyms < 2)
{
SourceError(source, "synonym must have at least two entries\n");
SourceError(source, "synonym must have at least two entries");
FreeSource(source);
return NULL;
} //end if
@ -891,7 +891,7 @@ int BotLoadChatMessage(source_t *source, char *chatmessagestring)
StripDoubleQuotes(token.string);
if (strlen(ptr) + strlen(token.string) + 1 > MAX_MESSAGE_SIZE)
{
SourceError(source, "chat message too long\n");
SourceError(source, "chat message too long");
return qfalse;
} //end if
strcat(ptr, token.string);
@ -901,7 +901,7 @@ int BotLoadChatMessage(source_t *source, char *chatmessagestring)
{
if (strlen(ptr) + 7 > MAX_MESSAGE_SIZE)
{
SourceError(source, "chat message too long\n");
SourceError(source, "chat message too long");
return qfalse;
} //end if
sprintf(&ptr[strlen(ptr)], "%cv%ld%c", ESCAPE_CHAR, token.intvalue, ESCAPE_CHAR);
@ -911,14 +911,14 @@ int BotLoadChatMessage(source_t *source, char *chatmessagestring)
{
if (strlen(ptr) + 7 > MAX_MESSAGE_SIZE)
{
SourceError(source, "chat message too long\n");
SourceError(source, "chat message too long");
return qfalse;
} //end if
sprintf(&ptr[strlen(ptr)], "%cr%s%c", ESCAPE_CHAR, token.string, ESCAPE_CHAR);
} //end else if
else
{
SourceError(source, "unknown message component %s\n", token.string);
SourceError(source, "unknown message component %s", token.string);
return qfalse;
} //end else
if (PC_CheckTokenString(source, ";")) break;
@ -1175,14 +1175,14 @@ bot_matchpiece_t *BotLoadMatchPieces(source_t *source, char *endtoken)
{
if (token.intvalue >= MAX_MATCHVARIABLES)
{
SourceError(source, "can't have more than %d match variables\n", MAX_MATCHVARIABLES);
SourceError(source, "can't have more than %d match variables", MAX_MATCHVARIABLES);
FreeSource(source);
BotFreeMatchPieces(firstpiece);
return NULL;
} //end if
if (lastwasvariable)
{
SourceError(source, "not allowed to have adjacent variables\n");
SourceError(source, "not allowed to have adjacent variables");
FreeSource(source);
BotFreeMatchPieces(firstpiece);
return NULL;
@ -1238,7 +1238,7 @@ bot_matchpiece_t *BotLoadMatchPieces(source_t *source, char *endtoken)
} //end if
else
{
SourceError(source, "invalid token %s\n", token.string);
SourceError(source, "invalid token %s", token.string);
FreeSource(source);
BotFreeMatchPieces(firstpiece);
return NULL;
@ -1298,7 +1298,7 @@ bot_matchtemplate_t *BotLoadMatchTemplates(char *matchfile)
{
if (token.type != TT_NUMBER || !(token.subtype & TT_INTEGER))
{
SourceError(source, "expected integer, found %s\n", token.string);
SourceError(source, "expected integer, found %s", token.string);
BotFreeMatchTemplates(matches);
FreeSource(source);
return NULL;
@ -2101,7 +2101,7 @@ bot_chat_t *BotLoadInitialChat(char *chatfile, char *chatname)
if (!strcmp(token.string, "}")) break;
if (strcmp(token.string, "type"))
{
SourceError(source, "expected type found %s\n", token.string);
SourceError(source, "expected type found %s", token.string);
FreeSource(source);
return NULL;
} //end if
@ -2172,7 +2172,7 @@ bot_chat_t *BotLoadInitialChat(char *chatfile, char *chatname)
} //end if
else
{
SourceError(source, "unknown definition %s\n", token.string);
SourceError(source, "unknown definition %s", token.string);
FreeSource(source);
return NULL;
} //end else