#pragma section-numbers off #pragma disable-camelcase = SDL_SetError = Use this function to set the SDL error message. <> == Syntax == {{{#!highlight cpp int SDL_SetError(const char* fmt, ...) }}} == Function Parameters == ||'''fmt''' ||a printf() style message format string || ||'''...''' ||additional parameters matching % tokens in the '''fmt''' string, if any || == Return Value == Returns always -1. == Code Examples == {{{#!highlight cpp SDL_SetError("Something unexpected happened!"); }}} {{{#!highlight cpp int errorCode = 0; ... errorCode = -37; ... if (errorCode < 0) SDL_SetError("Something unexpected happened: Error Code %d", errorCode); }}} == Remarks == Calling this function will replace any previous error message that was set. == Related Functions == . [[SDL_ClearError]] . [[SDL_GetError]] ---- [[CategoryAPI]], CategoryError