Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Lonnie
21
Years of Service
User Offline
Joined: 28th May 2003
Location:
Posted: 29th Oct 2003 19:06
Hey, I need some Help with my code, It seems that I am having trouble with my "If" Commands. What it is I know not, It does have an Error Message though, its "#100017: IF condition only takes one parameter at line 30".

I know I dont have anything after the "Gosub"s, But I dont think that is the Problem at the moment.




Thanks!

Do Print "Hello World"
Wait 2003 loop
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 29th Oct 2003 19:31
your missing Return statements, is one problem.
secondly, those open-ended gosubs can't be good

-RUST-
Lonnie
21
Years of Service
User Offline
Joined: 28th May 2003
Location:
Posted: 29th Oct 2003 20:09 Edited at: 29th Oct 2003 20:11
lol, ya I was not finished, I just like to test my stuff before I make problem that would be harder to fix. Oh ya, Thanks for those Return command reminder. *Edited out*

Thanks!



EDIT
K thanks! It works now thanks!

Do Print "Hello World"
Wait 2003 loop
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 29th Oct 2003 21:51


-RUST-
Lonnie
21
Years of Service
User Offline
Joined: 28th May 2003
Location:
Posted: 29th Oct 2003 22:33
More Trouble, Here is the code, try running it, then please tell me what Im doing wrong.



Thanks!

Do Print "Hello World"
Wait 2003 loop
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 29th Oct 2003 22:37 Edited at: 29th Oct 2003 22:39
change this bit...



to this...


every sub routine should have return at the end
MYSUB:
code code code
RETURN

like that...

ok still looking...

EDIT: the rest seems OK

-RUST-
Lonnie
21
Years of Service
User Offline
Joined: 28th May 2003
Location:
Posted: 29th Oct 2003 22:39 Edited at: 29th Oct 2003 22:45
Thanks,

Err uhh, Im still having Trouble with the Code... Some error like "#100001: COuld not determine parameter type of "'The Area of the Circle is " AreaCircle#' at line 53"

Thanks!

Do Print "Hello World"
Wait 2003 loop
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 29th Oct 2003 22:43
A good way to remember to close up any block of code is to type the closing command as soon as you type the opening command, so for example you type IF, immediately press enter and type ENDIF - then go back and fill in the code in between. The same holds true for sub routines, type the name MYSUB: , then press enter and type RETURN, then go back and fill in the rest of the code.

you'll get used to it, and it will save headaches down the road.


-RUST-
Lonnie
21
Years of Service
User Offline
Joined: 28th May 2003
Location:
Posted: 29th Oct 2003 22:54
See my last Post Rustler I think i was typing it right after you posted.

You Help a Lot! (you must have posted a ton!)

Do Print "Hello World"
Wait 2003 loop
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 29th Oct 2003 23:15
Quote: "You Help a Lot! (you must have posted a ton!)"


Ha ha. Thanks, I like to help. I have been coding in various forms of basic for 24 years (since I was 10-ish), and now I am a profession programmer (VB6/.NET)

I will copy your code and fix the stuff I mentioned and the other problem you listed above

yes we were cross-posting LOL

-RUST-
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 29th Oct 2003 23:25
ALL fixed up



the error was because when you PRINT, if you want to join up pieces of text and variable values you must Concatenate them with the ";" or "+" characters. All of your lines that tried to print were missing the ";" characters

Also you had an input statement that was missing a ","

I indented your code to make it more readable, and fixed the returns
It all runs OK now

let me know if there are any other bugs because I didn't try each routine.

and comment your code!

-RUST-
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 29th Oct 2003 23:31
Just found one more thing, you are not printing the result of Find Area Of a Triangle

maybe you knew that tho.


-RUST-
Lonnie
21
Years of Service
User Offline
Joined: 28th May 2003
Location:
Posted: 30th Oct 2003 00:22
Thanks! Here is it Finished. (Mabey Just my first Version, But I am a newb, and the is nearly my first program that will be useful...Hopefully)

In the next few week I wanna get some more shapes in there, like Cilinders, and Mabey Octogons, and stuff like that.

Its my "Geometry Caculator Beta v1.0"

Later


Thanks for all your help CattleRustler!

Do Print "Hello World"
Wait 2003 loop
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 30th Oct 2003 00:51
no problem, I like to help if I am able. I am still new-ish to dbp but not new to programming in general.

Good Job!
Keep up the good work, and post often so we can see your progress.

-RUST-

Login to post a reply

Server time is: 2024-11-25 14:24:41
Your offset time is: 2024-11-25 14:24:41