Raised This Month: $51 Target: $400
 12% 

Exception reported: Invalid Handle 0 (error: 4)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ImDatAlex
New Member
Join Date: Oct 2019
Location: Germany
Old 10-16-2019 , 15:38   Exception reported: Invalid Handle 0 (error: 4)
Reply With Quote #1

Quote:
Originally Posted by ImDatAlex View Post
So, I'm running a server on csgo and I just got a bhop-timer plugin; when I installed I just got:

Code:
L 10/16/2019 - 21:32:47: [SM] Exception reported: Invalid Handle 0 (error: 4)
L 10/16/2019 - 21:32:47: [SM] Blaming: bTimes\bTimes-core.smx
L 10/16/2019 - 21:32:47: [SM] Call stack trace:
L 10/16/2019 - 21:32:47: [SM]   [0] GetArrayString
L 10/16/2019 - 21:32:47: [SM]   [1] Line 1106, F:\Coding\bTimes\addons\sourcemod\scripting\bTimes-core.sp::Native_GetNameFromPlayerID
Both plugin codes are
1rst

Code:
if(idx >= iSize)
		ResizeArray(g_hCommandList, idx + 1);
	else
		ShiftArrayUp(g_hCommandList, idx);
	
	SetArrayString(g_hCommandList, idx, sListing);
}
2nd
Code:
        if(g_Ghost[0][ID] != 0)
        {
            if(IsClientInGame(g_Ghost[0][ID]))
            {
                SetEntProp(g_Ghost[0][ID], Prop_Data, "m_iFrags", 0);
                SetEntProp(g_Ghost[0][ID], Prop_Data, "m_iDeaths", 0);

                // Check clan tag
                decl String:sClanTag[64];
                CS_GetClientClanTag(g_Ghost[0][ID], sClanTag, sizeof(sClanTag));

                decl String:sName[MAX_NAME_LENGTH];
                GetNameFromPlayerID(g_GhostPlayerID[Type][Style], sName, sizeof(sName));

                if(Style == 30 && ID == 1){ }else
                {
                    if(IsPlayerAlive(g_Ghost[0][ID]))
                    {
                        if(!StrEqual(sName, sClanTag))
                        {
                            CS_SetClientClanTag(g_Ghost[0][ID], sName);
                        }
                    }
                }
Im not really good at Coding so please, modders I will appreciate help.

Last edited by ImDatAlex; 10-16-2019 at 15:47.
ImDatAlex is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 10-17-2019 , 07:39   Re: Exception reported: Invalid Handle 0 (error: 4)
Reply With Quote #2

Your first block of code doesn't correspond to the Native_GetNameFromPlayerID function.
Best bet would be to update your bTimes plugin; you may need to compile from source as the forum version isn't up-to-date.
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 10-17-2019 at 07:43.
nosoop is offline
ImDatAlex
New Member
Join Date: Oct 2019
Location: Germany
Old 10-18-2019 , 07:42   Re: Exception reported: Invalid Handle 0 (error: 4)
Reply With Quote #3

Sorry I just took the line it told me it was wrong, anyway;
I already update before posting, anyway, here's the real code:
Code:
public Native_GetNameFromPlayerID(Handle:plugin, numParams)
{
	if(g_hUser != INVALID_HANDLE && GetArraySize(g_hUser) > GetNativeCell(1))
	{
		decl String:sName[MAX_NAME_LENGTH];
		
		GetArrayString(g_hUser, GetNativeCell(1), sName, sizeof(sName));
		
		SetNativeString(2, sName, GetNativeCell(3));
	}
}
but anyway I think got a hint:
Code:
ALTER TABLE `maps` CHANGE `MapPlaytime` `MapPlaytime` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `players` CHANGE `Playtime` `Playtime` INT(11) NOT NULL DEFAULT '0';
ALTER TABLE `maps` CHANGE `LastPlayed` `LastPlayed` INT(11) NOT NULL DEFAULT '0';
does this change anything or even, where should I put It.

Last edited by ImDatAlex; 10-18-2019 at 07:43.
ImDatAlex is offline
Reply



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 09:29.


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