From f4d5fe642248dd9fe943d30b06b26556e717615a Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 30 Jun 2016 19:16:19 +0300 Subject: Add constants validation function. --- src/ecommon/init.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/ecommon/init.c') diff --git a/src/ecommon/init.c b/src/ecommon/init.c index 372e5ad..d91792e 100644 --- a/src/ecommon/init.c +++ b/src/ecommon/init.c @@ -33,3 +33,19 @@ void commonClean(void) aFree(mapindex->default_map); mapindex->default_map = NULL; } + +#define checkVar(name, value) \ + if (name != value) \ + { \ + ShowError(#name" wrong value. Found %d but must be %d.\n", \ + name, \ + value); \ + } + +void common_online(void) +{ + checkVar(MAX_SKILL, 1500); + checkVar(MAX_SKILL_ID, 10037); + checkVar(SC_MAX, 647); + checkVar(SI_MAX, 971); +} -- cgit v1.2.3-60-g2f50