How do you define more stuffs on 1 define ? (lol)
#1

PHP код:
#define CLANBAN "[test], [test2], [test3]"
#define nicknameban "admin, lol" 
So i just made that little system on detecting tags, and names on the player connection and if they match he gets the ban, but i dont understand why it stops detect since i've added 2 more tags , and 1 more nick. Is there a way to define more tags and nick on just 1 line. ?
Reply
#2

Quote:
Originally Posted by wallen
Посмотреть сообщение
PHP код:
#define CLANBAN "[test], [test2], [test3]"
#define nicknameban "admin, lol" 
So i just made that little system on detecting tags, and names on the player connection and if they match he gets the ban, but i dont understand why it stops detect since i've added 2 more tags , and 1 more nick. Is there a way to define more tags and nick on just 1 line. ?
That's not possible. Defines are basically a place holders, it gets replaced with the actual content on compiling. So doing this:

PHP код:
#define CLANBAN "[test], [test2], [test3]"
if(!strcmp(clanCLANBAN)) 
Becomes:

PHP код:
if(!strcmp(clan"[test], [test2], [test3]")) 
Reply
#3

Thanks solved
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)