Tuesday, 17 June 2014

Unit 14 - Event driven programming
P4

Logical Error
A logical error is an error that isn't in the code, for example there may be nothing wrong with the code but the text on the start button may be spelt wrong. Logical errors include problems such as spelling mistakes or using the wrong colours, words or even images. For example, when creating my game i noticed i had spelt the word 'Start' wrong on the start button. This is a Logical Error.
To fix this is had to correct the spelling mistake, so that it read 'Start'. In the end it looked like this:


Syntax error
Syntax errors are errors found in the code. For example the code may be wrong or typed out incorrectly which will effect the program. It may not make the program run correctly or how you want it to because the code is wrong. A syntax error will not allow your program to work. Here is an example i found myself, when coding my game, i realized i had a syntax error, which effected my game a lot. The problem was that i missed out a full stop after txtAttempts. It should say txtAttempts.Clear.
To fix this is had to add a dot in between txtAttempts and Clear. This error wouldn't let me run my game until i fixed it. This is how it looks after it has been edited.