strcmp = bugged?
#1

// Problem fixed by MadeMan.
Reply
#2

Fuck it, the thing is you forgot

if(kanepikontroll == 0)
Reply
#3

This is how strcmp works, it returns 0 if one of the strings is empty. So you should just check if they are not empty

pawn Код:
if(abKanep[x][kanep_rajaja][0] && strcmp(abKanep[x][kanep_rajaja], sendername) == 0)
Reply
#4

PHP код:
new kanepikontroll 0;
        for(new 
xsizeof(abKanep); x++) {
            if(
strcmp(abKanep[x][kanep_rajaja], sendername) == 0)
                {
                   if(
kanepikontroll == 1
                       {
                
kanepikontroll 1;
                
format(stringsizeof(string), "strcmp 1:[%s] 2:[%s] - matched strings"abKanep[x][kanep_rajaja], sendername);
                
SendClientMessageToAll(-1string);
                break;
            }
                   else
                        {
                               
SendClientMessage(playerid, -1"Sa oled juba vдhemalt ьhe kanepitaime kasvatama pannud.");              kanepikontroll 0;
                            
                         }
                   return 
1;
        } 
( Hard with the Language -.- )

EDIT: Nvm, i thought the Command was wrong or so, + i don't know shit about this 'stcmp' yet
Reply
#5

// it works.. thanks to MadeMan.
Reply
#6

Show the enum where you create 'kanep_rajaja'.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)