if(!strcmp not working...
#1

pawn Код:
if(!strcmp("9-2", text, true) && strlen(text)==strlen("10-0") && Code == true)
    {
        SendClientMessageToAll(0xDEEE20FF, "HELP");
    }
The code won't work what I want it to do is when a player types 9-2 it shows Use Cation in the main chat and it says the name of the person who said it etc..

RandomDude[0]: HELP

it would come like that if i type 9-2
Reply
#2

Need help
Reply
#3

Compile with this before the if and show us the result.
pawn Код:
printf("text: %s - strlen(text): %d - strlen(\"10-0\"): %d - Code: %s", text, strlen(text), strlen("10-0"), (Code ? ("true") : ("false"));
Then again, with that info you could probably figure the rest out on your own.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)