The variable index is not defined, so the compiler doesn't know what it means.
Tell him by using something like
int index = lstSaveGames.SelectedIndex;
at the beginning of the function. Before you can use a, in this case local variable, you must tell the compiler the type and name of the variable, for example:
int index = 0;
for an integer named index. You can assign an initial value ( = 0 ) in this case, but this is optional.
Tell him by using something like
int index = lstSaveGames.SelectedIndex;
at the beginning of the function. Before you can use a, in this case local variable, you must tell the compiler the type and name of the variable, for example:
int index = 0;
for an integer named index. You can assign an initial value ( = 0 ) in this case, but this is optional.