MCPcopy Create free account
hub / github.com/ZDoom/Raze / ScriptError

Method ScriptError

source/common/engine/sc_man.cpp:1077–1102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1075//==========================================================================
1076
1077void FScanner::ScriptError (const char *message, ...)
1078{
1079 FString composed;
1080
1081 if (message == NULL)
1082 {
1083 composed = "Bad syntax.";
1084 }
1085 else
1086 {
1087 va_list arglist;
1088 va_start (arglist, message);
1089 composed.VFormat (message, arglist);
1090 va_end (arglist);
1091 }
1092
1093 ParseError = true;
1094 if (NoFatalErrors)
1095 {
1096 Printf(TEXTCOLOR_RED "%sScript error, \"%s\"" TEXTCOLOR_RED " line %d:\n" TEXTCOLOR_RED "%s\n", PrependMessage.GetChars(), ScriptName.GetChars(),
1097 AlreadyGot ? AlreadyGotLine : Line, composed.GetChars());
1098 return;
1099 }
1100 I_Error ("%sScript error, \"%s\" line %d:\n%s\n", PrependMessage.GetChars(), ScriptName.GetChars(),
1101 AlreadyGot? AlreadyGotLine : Line, composed.GetChars());
1102}
1103
1104//==========================================================================
1105//

Callers 15

CheckEndOfFileMethod · 0.45
DEFINE_MAP_OPTIONFunction · 0.45
ParseMapHeaderMethod · 0.45
ParseMapInfoMethod · 0.45
ParseGrpInfoFunction · 0.45
S_AddSNDINFOFunction · 0.45
ParseVavoomSkyboxFunction · 0.45
ParsePointLightMethod · 0.45
ParsePulseLightMethod · 0.45
ParseFlickerLightMethod · 0.45
ParseFlickerLight2Method · 0.45
ParseSectorLightMethod · 0.45

Calls 4

PrintfFunction · 0.85
I_ErrorFunction · 0.85
VFormatMethod · 0.80
GetCharsMethod · 0.45

Tested by

no test coverage detected