18.05.2013, 08:01
Your macros
won't work, since you have to put semicolons before you call the last functions.
Try
pawn Код:
#define strncpy(%0,%1,%2,%3) \
strmid(%1,%1,0,((%2)-1)) \
strcat((%0[0] = '\0', %0),%1,%3)
#define strncat(%0,%1,%2,%3) \
strmid(%1,%1,0,((%2)-1)) \
strcat(%0,%1,%2)
#define strcasecmp(%0,%1,%2,%3) \
strtolower(%0) \
strtolower(%1) \
strcmp(%0,%1,%2,%3)
#define strncasecmp(%0,%1,%2,%3) \
strtolower(%0) \
strtolower(%0) \
strcmp(%0,%1,%2,%3)
Try
pawn Код:
#define strncpy(%0,%1,%2,%3) strmid(%1,%1,0,((%2)-1));strcat((%0[0]='\0',%0),%1,%3)
#define strncat(%0,%1,%2,%3) strmid(%1,%1,0,((%2)-1));strcat(%0,%1,%2)
#define strcasecmp(%0,%1,%2,%3) strtolower(%0);strtolower(%1);strcmp(%0,%1,%2,%3)
#define strncasecmp(%0,%1,%2,%3) strtolower(%0);strtolower(%0);strcmp(%0,%1,%2,%3)