They may ask to change GetplayerName() function? In your solution if PlayerName is not set to "" in GetplayerName() function, will there be runtime error?
pxla
Hi,
GetPlayerName always returns a string. If any characters are entered by the player then that string will be returned . If nothing is entered then an empty sting "" will be returned. I can't see how a runtime error (type exception) could be thrown.
You could validate within the GetPlayername function... I just felt it was clearer where I placed it.
If you getting an error please feel free to reply and I'll help if I can