strcmp bad checking or what?
#1

Debug:
pawn Код:
printf("DEBUG: |%s|, |%s|", SerwerInfo[sLosowyKod], message);
Generated:
Код:
[21:26:21] DEBUG: |5w*t5#.2a,fniu4u|
- there's no second code '%s' - message. Why?

Checking:
pawn Код:
if(!strcmp(SerwerInfo[sLosowyKod], message))
{
//rest
}
It's OnPlayerText callback. Message is my new way to send message. Just returning false for OnPlayerText callback. Messeage is my string of the message.
Reply
#2

Anyone?
Reply
#3

serwer? Isnt it server?
Reply
#4

Look at my Location and stop posting stupid posts. Let's back to the topic.
Reply
#5

Maybe You've created variables sLosowyKod and message as integer.
Reply
#6

Show us how you get the message string. The problem could possibly be there.
Reply
#7

No AndreT because i removed everything from OnPlayerText callback /* */ and put only code. And i changed message to text (from callback) and nothing too.

enum sLosowyKod[16];
pawn Код:
sLosowyKod[16],
bool:sCodeActive,
pawn Код:
if(SerwerInfo[sCodeActive])
    {
        printf("DEBUG: |%s|, |%s|", SerwerInfo[sLosowyKod], text);
        if(!strcmp(SerwerInfo[sLosowyKod], text))
        {
            new flowpoints = 5 + random(10);
            GivePlayerFlow(playerid, flowpoints);
            SerwerInfo[sCodeActive] = false;

            new string[128];
            format(string, sizeof(string), "* %s [ID: %d] przepisał najszybciej kod i otrzymał %d punktуw Flow.", PlayerName(playerid), playerid, flowpoints);
            SendClientMessageToAll(-1, string);
        }
    }
All should be okey for me.. maybe someone see the problem? - i changed it only to OnPlayerText callback and go test it again.
Reply
#8

Not working. Screen:
http://www.bankfotek.pl/image/1056199.jpeg

Debug:
Код:
|->b7-rrg!cl2-6j9
edit://
Sorry for double-post.
Reply
#9

What? sorry ****** i'm from Poland i don't understand what you mean exactly. I know what you said but not understand..
Reply
#10

So anybody see the problem? i need to bump because it's pissing me off (and 2nd page).
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)