Raised This Month: $ Target: $400
 0% 

Arrays


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Clauu
Senior Member
Join Date: Feb 2008
Location: RO
Old 09-21-2013 , 05:14   Re: Arrays
Reply With Quote #8

'==2' was just an value example and not position to delete, the code posted is similar to original that contains ents and i;m checking if those are valid before deletion. Hmm seems like the new array is remaped as it should but why it keeps giving me those errors
PHP Code:
public remove_ents() {

    new 
size ArraySize(arr_ents);
    
    if(
size<1)
        return;

    new 
entid,timer,classname[32];
    for (new 
0sizei++) {
        
        if (!
is_valid_ent((entid ArrayGetCell(arr_entsi)))) {
            
ArrayDeleteItem(arr_entsi);
            
ArrayDeleteItem(arr_ents_timei);
            break;
        }
            
        
timer ArrayGetCell(arr_ents_timei);
        if(
timer == 0) {
            
pev(entidpev_classnameclassnamecharsmax(classname));
            if(
equali(classname"GENT"))
                
engfunc(EngFunc_RemoveEntityentid);
            
ArrayDeleteItem(arr_entsi);
            
ArrayDeleteItem(arr_ents_timei);
        }
        else
            
ArraySetCell(arr_ents_time,itimer 1);
    }


Last edited by Clauu; 09-21-2013 at 05:16.
Clauu is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:03.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode