View Single Post
R1KO
Member
Join Date: Sep 2013
Old 03-24-2015 , 06:24   Re: SourceMod 1.7 released!
#95

PHP Code:
StringMap        g_Info[MAXPLAYERS+1] = {null, ...};

g_Info[iClient] = new StringMap();


// 1
// ...

char sTime[64];
hMenu.GetItem(ItemsTimesizeof(sTime));
g_Info[iClient].SetValue("Time"StringToInt(sTime));

// [SM] Native "StringMap.SetValue" reported: Invalid Handle 2e372e31 (error 4) 
// or [SM] Native "StringMap.SetValue" reported: Invalid Handle 85 (error 7)

// ...

char sTime[64];
hMenu.GetItem(ItemsTimesizeof(sTime));
int iTime StringToInt(sTime);
g_Info[iClient].SetValue("Time"iTime);

// So all is well

// 2
char sInfo[128];
hMenu.GetItem(ItemsInfosizeof(sInfo));
LogMessage("1: iClient: %i, Size: %i, %x"iClientg_Info[iClient].Sizeg_Info[iClient]);
// 1: iClient: 5, Size: 6, 20b0060
g_TargetInfo[iClient].SetString("Reason"sInfo);
LogMessage("2: iClient: %i, Size: %i,  %x"iClientg_Info[iClient].Sizeg_Info[iClient]);
// 2: iClient: 5, Size: 7,  20b0060

SendConfirmMenu(iClient);

// ...

SendConfirmMenu(int iClient)
{
    
char sName[MAX_NAME_LENGTH], sReason[128], sTime[128];
    
LogMessage("SendConfirmMenu: iClient: %i, Size: %i, %x"iClientg_Info[iClient].Sizeg_Info[iClient]);
    
// SendConfirmMenu: iClient: 5, Size: 7, 20b0060
    
g_Info[iClient].GetString("Reason"sReasonsizeof(sReason));
    
// [SM] Native "StringMap.GetString" reported: Invalid Handle 2e372e31 (error 4)
    
g_Info[iClient].GetString("TimeInfo"sTimesizeof(sTime));
    
g_Info[iClient].GetString("Name"sNamesizeof(sName));
    
    
// ...

R1KO is offline
Send a message via Skype™ to R1KO