Originally posted by Manical
ill get right to it im trying to pul black ops 1 clients correctly heres the code
try
{
if (listBoxControl17.ItemCount == 1)
{
listBoxControl17.Items.Add(17);
}
for (uint i = 0; i < 18; i++)
{
listBoxControl17[0, Convert.ToInt32(i)].Value = i;
listBoxControl17[1, Convert.ToInt32(i)].Value = ClientNames(i);
}
error is in red error in vs reads "can not apply indexing with [] to and expression of type listboxcontrol17"
whats a good work around so i can get rid of this error and populate the listbox with clients?
If you want this in c# just use a datagridview....
if (dataGridView1.Rows.Count == 1)
{
dataGridView1.Rows.Add(17);
}
for (int i = 0; i < 18; i++)
{
dataGridView1[0, Convert.ToInt32(i)].Value = i;
dataGridView1[1, Convert.ToInt32(i)].Value = GetClientNames(i);
}
and heres a getclient function if needed:
public static string GetClientNames(int Client)
{
string names = PS3.Extensions.ReadString(Client0Name + ((uint)Client * ClientSize));
return names;
}
Hope this help...
If ive written anything out wrong just let me know and ill fix it