Thread: [Solved] Invalid cellvector handle
View Single Post
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-23-2018 , 12:24   Re: Invalid cellvector handle
Reply With Quote #27

Literally impossible to figure out. I've lost count how many times I told you to debug everything in your code, EVERY SINGLE LINE. Most of your threads could have been resolved if you properly debugged. And no, putting 4 log_to_file is not proper debugging. Take each piece of code and see how it executes, instruction by instruction.

Now, on a more serious note, it's quite obvious. On first call(from plugin_init) you populate the g_aOrigins array.
Then on new round your clear that array and try to fill it again. What happens is that it's simply not filled again.
Why? With a debug code like:
PHP Code:
    for( new i=1<= MAX_ORIGINSi++ )
    {
        if( 
SsGetOriginfOrigin ) )
        {
            
server_print("Adding origin")
            
SaveOriginfOrigin );
        }
        else 
        {
            
server_print("Out of points")
        }
    } 
You would see SsGetOrigin will always return false("Out of points" is being printed) on calls from NewRound. It happens because you never call SsScan in NewRound and once the first set of calls to SsGetOrigin(from plugin_init) is finished the underlying array used by superspawn becomes empty.
__________________

Last edited by HamletEagle; 07-23-2018 at 12:26.
HamletEagle is online now