46 { |
46 { |
47 char buff[256]; |
47 char buff[256]; |
48 |
48 |
49 if (c->error != NULL) { |
49 if (c->error != NULL) { |
50 SetDParamStr(0, c->filename); |
50 SetDParamStr(0, c->filename); |
51 SetDParam(1, c->error->data); |
51 SetDParamStr(1, c->error->data); |
52 for (uint i = 0; i < c->error->num_params; i++) { |
52 for (uint i = 0; i < c->error->num_params; i++) { |
53 uint32 param = 0; |
53 uint32 param = 0; |
54 byte param_number = c->error->param_number[i]; |
54 byte param_number = c->error->param_number[i]; |
55 |
55 |
56 if (param_number < c->num_params) param = c->param[param_number]; |
56 if (param_number < c->num_params) param = c->param[param_number]; |
57 |
57 |
58 SetDParam(2 + i, param); |
58 SetDParam(2 + i, param); |
59 } |
59 } |
60 |
60 |
61 char message[512]; |
61 char message[512]; |
62 GetString(message, c->error->message, lastof(message)); |
62 GetString(message, c->error->custom_message != NULL ? BindCString(c->error->custom_message) : c->error->message, lastof(message)); |
63 |
63 |
64 SetDParamStr(0, message); |
64 SetDParamStr(0, message); |
65 y += DrawStringMultiLine(x, y, c->error->severity, w, bottom - y); |
65 y += DrawStringMultiLine(x, y, c->error->severity, w, bottom - y); |
66 } |
66 } |
67 |
67 |