SuperSonic wrote:Just one problem, if you press backspace when there is nothing in the name, the game crashes Don't know why sorry about that.
Well, look at the gogo's code.
Now, what is 0 - 1? It's - 1. Is there array cell - 1? NO!
It's important to remember to use safety checks. Like here, let's make it check if the current array position is greater than 0.
- Code: Select all
for(k=0;k<255;k++)
{
if(TD_String.text[k]==0)
{
TD_String.text[k - 1 * (k > 0)]=0;
break;
}
}
Now, the code does nothing if you're at the position 0.
I wonder why hadn't GaG thought of this..
Anyway, that's it.