Error at line number, but no code?

Questions regarding syntax

Error at line number, but no code?

Postby kevinrandell » Sat Sep 03, 2011 11:59 am

I have a project where I have a run time error, The error message says it is at a line number which is greater than the number of lines of code. Deleting ALL the code I still get an error in code at a line number that does not exist?

Regards,
Kevin
kevinrandell
 
Posts: 13
Joined: Fri Jun 17, 2011 4:55 am

Re: Error at line number, but no code?

Postby Henning » Sat Sep 03, 2011 1:53 pm

Try deleting all files in KBasic/ide/cache.

/Henning
Henning
 
Posts: 262
Joined: Mon Feb 09, 2009 12:03 am
Location: Sweden

Re: Error at line number, but no code?

Postby kevinrandell » Sun Sep 04, 2011 12:38 am

I have worked out there is no problem with the code, but rather an issue with an object on the form. Looking at the textfile that is the form in an editor the line number corresponds to a property of a label.
kevinrandell
 
Posts: 13
Joined: Fri Jun 17, 2011 4:55 am

Re: Error at line number, but no code?

Postby berndnoetscher » Mon Sep 05, 2011 7:28 am

kevinrandell wrote:I have worked out there is no problem with the code, but rather an issue with an object on the form. Looking at the textfile that is the form in an editor the line number corresponds to a property of a label.


How many controls do you have on your form. Maybe recreating it would solve the issue.
berndnoetscher
Site Admin
 
Posts: 1059
Joined: Tue Sep 25, 2007 9:37 am

Re: Error at line number, but no code?

Postby kevinrandell » Wed Sep 07, 2011 6:14 am

I am using KBasic as the programming language for my Intro to Programming course. Each project this error is happening with about 25% of the students. I have looked into the form file with a text editor to see what the line number corresponds to in terms of object / property, deleting this sometimes works. If we delete all objects and start again this also sometimes work. It does seem to be very hit or miss.

I will grab one of the offending projects and upload if that would help.

Regards,
Kevin
kevinrandell
 
Posts: 13
Joined: Fri Jun 17, 2011 4:55 am

Re: Error at line number, but no code?

Postby berndnoetscher » Wed Sep 07, 2011 12:43 pm

kevinrandell wrote:I am using KBasic as the programming language for my Intro to Programming course. Each project this error is happening with about 25% of the students. I have looked into the form file with a text editor to see what the line number corresponds to in terms of object / property, deleting this sometimes works. If we delete all objects and start again this also sometimes work. It does seem to be very hit or miss.

I will grab one of the offending projects and upload if that would help.

Regards,
Kevin



Send it to bernd@kbasic.com please.

Thanks in advance.
berndnoetscher
Site Admin
 
Posts: 1059
Joined: Tue Sep 25, 2007 9:37 am

Re: Error at line number, but no code?

Postby Slowdown » Wed Sep 07, 2011 2:29 pm

If i can help, place it on the forum.
Regards
Slowdown for now i'm back
Slowdown
 
Posts: 347
Joined: Sat May 02, 2009 6:48 pm
Location: Netherlands

Re: Error at line number, but no code?

Postby kevinrandell » Sun Sep 18, 2011 4:23 am

Attached is the start of a student project. No code, just a label and command button. The syntax error corresponds to a line number that does not exist in the code.
Attachments
Messed_up_file_13blankej.zip
(2.27 KiB) Downloaded 151 times
kevinrandell
 
Posts: 13
Joined: Fri Jun 17, 2011 4:55 am

Re: Error at line number, but no code?

Postby kevinrandell » Sun Sep 18, 2011 4:32 am

Additional information.

Cutting and pasting the command button removes the error, but renames the command button back to a default name?

Regards,
Kevin
kevinrandell
 
Posts: 13
Joined: Fri Jun 17, 2011 4:55 am

Re: Error at line number, but no code?

Postby Slowdown » Sun Sep 18, 2011 9:05 am

Hi Kevin,

Fixed,
no_longer_Messed_up.png
no_longer_Messed_up.png (10.48 KiB) Viewed 1938 times

Solution,
Rename the Button to something else for example ResetBut.
I think the the word reset is reserved, so it's not allowed.
Regards
Slowdown for now i'm back
Slowdown
 
Posts: 347
Joined: Sat May 02, 2009 6:48 pm
Location: Netherlands

Next

Return to Coding Questions

cron