Invalid/unsupported p-code file format
#5

But it doesnt. Just crashes. If I commented that command, it compiles.

pawn Код:
if (strcmp( cmd, "/warn", true ) == 0 ) {
   
        if( IsPlayerConnected( playerid ) ) {
       
            if( gPlayerLogged[ playerid ] == 0) {
                return SendClientMessage( playerid, COLOR_GREY, " VIGA: Sa ei ole sisse logitud. ");

            if( PlayerInfo[ playerid ][ pAdmin ] < 1 )
                return SendClientMessage( playerid, COLOR_GREY, " VIGA: Ainult adminid vхivad seda kдsklust kasutada. ");
               
            tmp = strtok(cmdtext, idx);
            if( !strlen( tmp ) ) {
           
                SendClientMessage( playerid, COLOR_GRAD2, " DEBUG: /hoiata <ID/NIMI> <Pхhjus> ");
                return true ;
            }
            giveplayerid = ReturnUser( tmp );
            if( IsPlayerConnected( giveplayerid ) ) {
           
                    if( giveplayerid != INVALID_PLAYER_ID ) {
                   
                        GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                        GetPlayerName(playerid, sendername, sizeof(sendername));
                        new length = strlen(cmdtext);
                        while ((idx < length) && (cmdtext[idx] <= ' '))
                        {
                            idx++;
                        }
                        new offset = idx;
                        new result[64];
                        while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                        {
                            result[idx - offset] = cmdtext[idx];
                            idx++;
                        }
                        result[idx - offset] = EOS;
                        if( !strlen( result ) ) {
                       
                            SendClientMessage( playerid, COLOR_GRAD2, " DEBUG: /hoiata <ID/NIMI> <Pхhjus>");
                            return true ;
                        }
                        PlayerInfo[ giveplayerid ][ pWarns ] ++ ;
                        if( PlayerInfo[ giveplayerid ][ pWarns ] >= 3) {
                       
                                PlayerInfo[playerid][pLocked] = 2;
                            SendClientMessage( playerid, COLOR_LIGHTRED, " Sinu konto lukustati, kuna sul on tдpselt 3 vхi enam hoiatust. ");
                            Ban( giveplayerid );
                            return true ;
                        }
                        format( string, sizeof( string ), " Admin %s hoiatas sind. Pхhjus: %s. " , sendername , result );
                        SendClientMessage( giveplayerid, COLOR_LIGHTRED , string );
                        format( string, sizeof( string ), " Sa hoiatasid %s'i. Pхhjus: %s. " , giveplayer , result );
                        SendClientMessage( playerid ,COLOR_LIGHTRED , string );
                        return true ;
                    }
            }
        }
        return true ;
    }
This is the original script.
Edit: Nvm, the command works but if i warn somebody, it always warns me.
Reply


Messages In This Thread
Invalid/unsupported p-code file format - by vent - 27.08.2011, 11:24
Re: Invalid/unsupported p-code file format - by =WoR=G4M3Ov3r - 27.08.2011, 11:28
Re: Invalid/unsupported p-code file format - by vent - 27.08.2011, 11:32
Re: Invalid/unsupported p-code file format - by =WoR=G4M3Ov3r - 27.08.2011, 11:38
Re: Invalid/unsupported p-code file format - by vent - 27.08.2011, 11:44
Re: Invalid/unsupported p-code file format - by vent - 29.08.2011, 11:31

Forum Jump:


Users browsing this thread: 2 Guest(s)