Run time error array index out of bounds[+rep]
#4

Well with FormatHouseWeapons i had string[] because at the bottom im formating the string (256) to %s like so

return format(string, 256, "%s", wstr);

my new wstr is my wstring

which are defined here,

new wstring1[56], gunname1[32];
GetWeaponName(PlayerInfo[id][pPerm1],gunname1,sizeof(gunname1));
if(PlayerInfo[id][pPerm1] == 0) { wstring1 = "None"; }
else if(PlayerInfo[id][pPerm1] > 0) { wstring1 = gunname1; }
else { wstring1 = "None"; }

new wstring2[56], gunname2[32];
GetWeaponName(PlayerInfo[id][pPerm2],gunname2,sizeof(gunname2));
if(PlayerInfo[id][pPerm2] == 0) { wstring2 = "None"; }
else if(PlayerInfo[id][pPerm2] > 0) { wstring2 = gunname2; }
else { wstring2 = "None"; }

new wstring3[56], gunname3[32];
GetWeaponName(PlayerInfo[id][pMeleeWep],gunname3,sizeof(gunname3));
if(PlayerInfo[id][pMeleeWep] == 0) { wstring3 = "None"; }
else if(PlayerInfo[id][pMeleeWep] > 0) { wstring3 = gunname3; }
else { wstring3 = "None"; }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 3 Guest(s)