Thread: [Solved] Invalid cellvector handle
View Single Post
edon1337
Penguin Enthusiast
Join Date: Jun 2016
Location: Macedonia
Old 07-23-2018 , 12:02   Re: Invalid cellvector handle
Reply With Quote #26

Quote:
Originally Posted by maqi View Post
Don't give me that attitude again dude, check your code again, accept when you are wrong.

As for what Ghosted said:
First check if array has items, then and only then u can generate a random integer to index it. So your argument there is invalid also.
What attitude are you talking about dude? You're so persistent on your false self-created imaginary opinion of me being mean to you.

Again, if I check if array is empty and just stop the action, I won't get anything generated. So stop replying non-sense around. And here's the proof that shows my point is valid, because otherwise you keep on bothering.
PHP Code:
L 07/23/2018 18:00:26#1 Size: 0
L 07/23/2018 18:00:26#2 Size: 0
L 07/23/2018 18:00:26#2 Size: 1
L 07/23/2018 18:00:26#2 Size: 2
L 07/23/2018 18:00:26#2 Size: 3
L 07/23/2018 18:00:26#2 Size: 4
L 07/23/2018 18:00:26#2 Size: 5
L 07/23/2018 18:00:26#2 Size: 6
L 07/23/2018 18:00:26#2 Size: 7
L 07/23/2018 18:00:26#2 Size: 8
L 07/23/2018 18:00:26#2 Size: 9
L 07/23/2018 18:00:26#2 Size: 10
L 07/23/2018 18:00:26#2 Size: 11
L 07/23/2018 18:00:26#2 Size: 12
L 07/23/2018 18:00:26#2 Size: 13
L 07/23/2018 18:00:26#2 Size: 14
L 07/23/2018 18:00:26#2 Size: 15
L 07/23/2018 18:00:26#2 Size: 16
L 07/23/2018 18:00:26#2 Size: 17
L 07/23/2018 18:00:26#2 Size: 18
L 07/23/2018 18:00:26#2 Size: 19
L 07/23/2018 18:00:26#2 Size: 20
L 07/23/2018 18:00:26#2 Size: 21
L 07/23/2018 18:00:26#2 Size: 22
L 07/23/2018 18:00:26#2 Size: 23
L 07/23/2018 18:00:26#2 Size: 24
L 07/23/2018 18:00:26#2 Size: 25
L 07/23/2018 18:00:26#2 Size: 26
L 07/23/2018 18:00:26#2 Size: 27
L 07/23/2018 18:00:26#2 Size: 28
L 07/23/2018 18:00:26#2 Size: 29
L 07/23/2018 18:00:26#2 Size: 30
L 07/23/2018 18:00:26#2 Size: 31
L 07/23/2018 18:00:26#2 Size: 32
L 07/23/2018 18:00:26#2 Size: 33
L 07/23/2018 18:00:26#2 Size: 34
L 07/23/2018 18:00:26#2 Size: 35
L 07/23/2018 18:00:26#2 Size: 36
L 07/23/2018 18:00:26#2 Size: 37
L 07/23/2018 18:00:26#2 Size: 38
L 07/23/2018 18:00:26#2 Size: 39
L 07/23/2018 18:00:26#2 Size: 40
L 07/23/2018 18:00:32#1 Size: 0
L 07/23/2018 18:00:32#4 0.0 0.0 0.0 
Quote:
Originally Posted by KliPPy View Post
Do that, disable all other plugins and test it out. NO SIDE EFFECTS. If it produces the error then post the code. Nobody wants to assume what // code is or what RoundStarted actually is in your example. If you want people to help you then you should make it easy for them.
Samr thing, disabled all plugins.

PHP Code:
#include < amxmodx >
#include < superspawns >

#define MAX_ORIGINS 100

enum _:OriginDimensions
{
Float:ORIGIN]
}

new Array:
g_aOrigins;

public 
plugin_init( )
{
    
SsInit1000.0 );
    
SsScan( );
    
SsDump( );

    
RetrieveOrigins( );
    
    
register_logevent"OnNewRound"2"1=Round_Start" );
}

public 
plugin_precache( )
{
    
g_aOrigins ArrayCreateOriginDimensions );
}

public 
OnNewRound( )
{
    new 
Float:fOrigin];

    
ArrayClearg_aOrigins );
    
RetrieveOrigins( );

    
GetRandomOriginfOrigin );

    
log_to_file"Array.txt""#4 %.1f %.1f %.1f"fOrigin], fOrigin], fOrigin] );
}

RetrieveOrigins( )
{
    
log_to_file"Array.txt""#1 Size: %d"ArraySizeg_aOrigins ) );

    new 
Float:fOrigin];

    for( new 
i=1<= MAX_ORIGINSi++ )
    {
        if( 
SsGetOriginfOrigin ) )
        {
            
SaveOriginfOrigin );
        }
    }
}

SaveOriginFloat:fOrigin] )
{
    
log_to_file"Array.txt""#2 Size: %d"ArraySizeg_aOrigins ) );

    new 
eDataOriginDimensions ];

    
eDataORIGIN ][ ] = _:fOrigin];
    
eDataORIGIN ][ ] = _:fOrigin];
    
eDataORIGIN ][ ] = _:fOrigin];

    
ArrayPushArrayg_aOriginseData );
}

GetRandomOriginFloat:fOrigin] )
{
    new 
eDataOriginDimensions ];

    if( ! 
ArraySizeg_aOrigins ) )
    return 
PLUGIN_HANDLED;
    
    new 
iRandomEntry random_num0ArraySizeg_aOrigins ) );

    
log_to_file"Array.txt""#3 Size: %d | Entry: %d"ArraySizeg_aOrigins ), iRandomEntry );

    
ArrayGetArrayg_aOriginsiRandomEntryeData );

    
fOrigin] = eDataORIGIN ][ ];
    
fOrigin] = eDataORIGIN ][ ];
    
fOrigin] = eDataORIGIN ][ ];

    
ArrayDeleteItemg_aOriginsiRandomEntry );
    return 
PLUGIN_CONTINUE;

__________________

Last edited by edon1337; 07-23-2018 at 12:05.
edon1337 is offline