Added: 5 years ago
From: jaywalker512
Views: 39,762
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (279)

Sign In or Sign Up now to post a comment!
  • error 21: Type mismatch, found 'then' in 'if choice = 1 then'

    error 21: Type mismatch, found 'then' in 'elseif choice = 2 then'

    I can't fix this, any help?

  • Comment removed

  • Comment removed

  • i love these two videos, and it's funny you're eating a brownie and teaching. i love it. thank you for teaching me the basics of basic! <3

  • It says:

    Assembler messages:

    Can't open Basic\bin\win32\as.exe for reading: No such file or directory

    C:\PROGRA~1\Free: Basic\bin\win32\ld.exe: No such file: No such file or directory

    what do I do?

  • error 41: Variable not declared, answer in 'answer = num1 + num2''

    What do I do?

  • dont worry i figured it out

  • hey could you inbox me reason for error code 33. expected 'END IF', found 'end' in 'end sub'

  • nice burp brandon

  • thanks brandon

  • Nope solved it all cheers!

  • Actually, I have fixed my problem but stumbled something else, it is not an error, it just does not let me see even if I type 'sleep'

  • Ok Im at the end of the add sub, although when I F5 all that happens is error 136

    help?

  • lol i paused it before you finished the add sub and did subtract divide times and power of XD

    P.S. this is my first time programming.

  • Ok, So i got all of this , most of it pretty simliar to Batch Programming, Just one question sometimes when im using the input feature it skips the user interference! Here is my Code print "Hello! Welcome to the Easy Quiz!" print "Lets Get Started shall we?" print "Click any key to Continue!" sleep dim hisname as string cls input "What is your name" ; hisname sleep cls print "Alright " ; hisname print "Click any key to Start!" declare sub q1 sleep q1 So What am i doing wrong??
  • I get an error 33 when I'm trying to end the main sub. Can you please help?

  • Where can i get the thing you write the stuff into?

  • i get a 136 error every time i try to use subs.

  • you say to avoid the error 136 you have to name a variable type, in the calculator tutorial i dont know what to name the variable for "dim choice as......" PLZ HELP THANKS :)

  • @XzVanQuisHzX dim choice as integer

  • is there a way you can make a number with a fractional part (decmals behind the dot [for instance: 3.193823]), because my calculator rounds everything down

  • @ojima510 Yes, you need to use floating point values by declaring a variable either double or single. check out the freebasic wiki.

  • great videos you're making. I completed a calculator which could add, subtract, multiply and divide before you made the "add"-part. :)

  • Jaywalker was is the reason about the then bcuz i keep getting errors on them

  • lol i did programming like this before.. i didnt expect it to be so similar

  • Screw this dude, hes teaching us basic programming yet he doesnt explain how to fix some simple problem. Bro you made a programming guide, i hope to let you know theirs gonna be issues, i had error 21, error 136...

  • This is a more complicated version of batch and in Bach no downloading needed and is simpler

  • please help, i made a calculator like yours and i put this...

    input "Do you want to restart" ; restart1

    if restart1="no" then end

    if restart1="yes" then main

    ,and i click run it says that "main" isnt a choice or whatever...

  • i have a problem with dim... error 136:Default types or suffixes are only valid in -lang deprecated or fblite or qb in 'dim choice'.....

  • For the print namme script part add ; " is stupid" so it would read

    print namme ; " is stupid"

    Now show your friends :D

  • @WCArmy69 i get it too :I it is quite anoying ;I

  • Oh wait holy shit, this is from '06...

  • @WCArmy69 That's because he forgot to declare "choice" as an integer.

    That's line 6.

  • dude put the fuckin brownies away, unless your gonna share!!

  • i did multiply add subtract and divide xD

  • Ok I have a question, I have scripted with pawno a little san andreas multiplayer scripting, can I use c++ notepad or whatever it is called to script this or do I need another program?

  • @farmer1710 Excuse me I ment notepad++

  • thank you verry much your lesson's are the best i have found thanks :D

  • Hi, I'm quite new to basic programming and your videos are spot on for a newbie like me. One thing is bothering me thought, how can I have the codes recognize decimal places? I've tried doing it for first 9 digits of pi (3.14159265) but it only considers 3 and not the decimal places. Any help?

  • @WCArmy69 ya me too i am getting this error continuously

  • i want to ask that if we want to add more than 2 numbers than it would not work so how will we able to add or subtract more than 2 numbers??? reply plz

  • Program inside a program? PROGAMCEPTION

  • hey is there somet im doing wrong cuz i followed the same process but multiplication n division wont work

  • what is the point of this program exactly ? i mean for real...playing q and a ?!

  • @WCArmy69 I think you might have your sub name and dim name as the same thing. Notice in the example in the video that one is "namee" and the other is "namme".

    I was confused at first as well.

  • Hey, great videos.

    Only one problem.

    Me.

    I just downloaded the newest version of FBIde (comes with freebasic), and the some of the stuff you use in this video doesn't work for me in the new version. For example, i keep getting error messages at the bottom of the screen telling me that (this is during the caluclator thing) when I put in 'dim choice' that "choice" is a suffix or something and that doesn't work in the new version. Can you help me? Already tried puttin dim choice as string....

  • Hey, great videos.

    Only one problem.

    Me.

    I just downloaded the newest version of FBIde (comes with freebasic), and the some of the stuff you use in this video doesn't work for me in the new version. For example, i keep getting error messages at the bottom of the screen telling me that (this is during the caluclator thing) when I put in 'dim choice' that "choice" is a suffix or something and that doesn't work in the new version. Can you help me? Already tried puttin dim choice as string....

  • @WCArmy69 I used it and it worked.

  • @WCArmy69 For exaple write "dim choice as integer"

  • when im opening its saying compilation failed! why? if done just as you have but added a answer for the subtract sub

    thanks this real helped me understand what its all about

  • FUUUUU!! you made me hungry for brownies T.T

  • Im getting an error 21 that says "Type mismatch, found 'then' in 'if choice = 1 then''

    Help please?

  • I want brownies....

  • @WCArmy69 same! i cant find out how to fix it :\

  • my programs keep closing =( is it because free basic is 32 bit? i copy your stuff word for word and it still doesnt work (sometimes it does)

  • @jaywalker512 Everytime I try to get the main sub in the calculator to work it just says:

    Illegal inside functions, found 'sub' in 'sub end'

    I did exactly what u did but that error just keeps coming up

    any tips?

  • How can i make it so that after adding or whatever and it goes back to the main, that I can use it again,without needing for the program to end? Cos mine keeps closing .

    Best tutorial i found on youtube so far btw :)

  • @abishan10 ah dont worry I figured out if u put main after end sub it makes it work :)

  • I'm making a matrix program that calculates the determinants, adds them, etc right now.

    so thanks for your help:)

    couldn't have started it without you

  • I want to make yes no questions but the program says it doesnt know wat it is how do i dim yes/no to make them recognizable?

  • Whatever I do, I keep getting error 33. I type in 'end if' and it says it expected 'end if' in 'end if"

    what do I do?

  • This is awesome, just this lesson allowed me to play with the calculator program afterwards and I could figure out by myself how to give the user an option as to whether they wanted to start over or if they wanted to quit. Fun!

  • "mm" ber-ownie. HAHAHA!

    I made a calculator that talks like a pirate, btw!

  • keep getting error 14 cant get rid of it

  • A program inside a program... Insubtion!

  • i am impressed with your teaching skills :D

    THANKS Sub And Voted +

  • isnt BASIC a program that had to be written? how do you write a program (or the first program that was ever written) without a program writing software?

  • I did one with add, subtract, multiply and division. im so happy thanks jaywalker!!!

  • please help! it says "variable not declared, anwser in 'anwser = num1 + num2" pleeeeeeeeeeeeeeeeeeeeeaaaase help ! :-(

  • @ultislasher1 GOT IT!

  • youre awesome! you DESERVE delecious brownies! xD

  • in the calculator program it saying that line 6 and 21 default types or suffixes are only valid in -lang deprecated and fblite

    what does that mean, what's the error? the code is exactly like yours.

  • @Justatoxicmemory got it, didn't declare as integer.

  • 11:30

    My Fbide is saying that variable is not declared, it's coded exactly like yours, what am I missing. It says exactly

    variable not declared, number in 'input "enter a number" ; number'

  • @Justatoxicmemory It worked when I did the whole dim shared bit. wierd.

  • 90,000 people gave up from lesson 1 xD

  • an error comes up where dim choice dim num1 dum num2 and dim answer and idea how to fix this problem please??

  • @halley1990 make it say dim num1 as integer dim num2 as integer and dim answer as integer

  • could you tell me whats wrong? i have a problem when i try to runn it it says:

    Type mismatch, found 'then' in 'if choice = 1 then'

    Type mismatch, found 'then' in 'elseif choice = 2 then'

    btw my code:

    declare sub main

    declare sub addd

    declare sub subtract

    main

    sub main dim choice as string Print "1. Add" Print "2. subtract" input "what is your choice" ; choice if choice = 1 then addd elseif choice = 2 then subtract

    sorry coudn't put all of it in :(

  • @TANKVC the code looks more effed up then its actually lookes like

  • @TANKVC im having the exact same issue with " found 'then' in 'if choice = 1 then', same with choice = 2

  • jaywalker512 i love your videos thx so much but i was wondering what is the point of a sub? like what can it be used for? plz message me back

  • @AtomicTheater It's to contain code that you're going to use more than once. For example, if you write a sub that asks a few questions and stores the answers, each time you want to use it you only have to call the sub (one line) as opposed to retyping all the code in the sub each time you want it to do the same thing again.

  • im using chipmunk basic but this doesn't work.

  • i love brownies too

  • jaywalker thx so much for the video but i have a question how do i do a if then statement using words not numbers

  • How can I call a sub with a variable with it? Like my subs are program1, program2, program3. How can I make it so that whatever the user types in will go to that program? Like I want it to be goto program(x).

  • I want to make computer programs know how I could do that or learn how too

  • a dream inside a dream??

  • Hmm, for some reason I'm craving brownies after watching this..

  • im using qb64 and i cant use the "subtract" command. it just says syntax error.what should i do?

  • When I try to make an easter egg that is triggered by entering text, how would I go about that?

  • Hey I was wondering, How do I make the : if answer = awesome then

    work? like if you type awesome, how can it detect it?

    dim answer

    input "are you awesome or dumb"

    if answer = awesome then

    print "your awesome"

  • @doomers11 You have to use quotes to distinguish numbers from text. ie: if answer = "awesome" do whatever

  • Nevermind, figured it out. You can add elseif as many times as you want. Great videos btw.

  • Can someone explain how I can expand the options? I was unable using 'if' 'elseif' and else because i can't have more than three options incl main yeah?

  • how would i go about making it grab a number from a integer then add a number overwrite the integer?

  • How do I make something repeat, like saying "YEA" over and over again?

  • @SuperEmoBros With loops, pretty sure I cover them in lesson 3.

  • At the calculator. I did the EXACT same as you, but it wont open.. -.-

    it says I have to dim "choice" as something..

  • @Enockser1 i used  dim num1 as double

    if you use double it can do decimal numbers

  • At the calculator. I did the EXACT same as you, but it wont open.. -.-

  • this video has 22 thousand views. IMAGINE THAT!

  • The brownie noises ruined video for me.

  • Comment removed

  • @DACAN I take it you figured it out ;)

  • hey friend would you mind in telling me how I declare parameters in sub? I just can't do it , freebasic comes with a msg like this: "Default types or suffixes are only valid in -lang...." what I am doing is to pass a variable from another sub above the one I am dealing.

  • 22:15 "... it should be done, unless I made some extremely stupid mistake..."

    Haha, you mean besides the fact that your subraction sub is doing addition?

    I kid. Great videos, very helpful for learning programming. Though you do make some mistakes throughout, those actually help more as I know I'm learning the material when I'm able to spot what will go wrong before you run the program.

    Thanks for the vids!

  • the code doesn't work and i did exactly as shown. it says error at line *blah* *blah* and it wont work

  • SUBSRIBED!

  • do you use palm basic? if you do, please make a tutorial!!!!!

    by the way, im subscribing to you. (i should make a program to do that for me...)

  • Lmfao the 'uf!' ROFL.

  • Ok, could someone explain the difference between elseif and else to me?

    Thanks a million times if you do :D

    BTW great tutorials

    print "Brownies are good. Mmmmm!"

    sleep

  • @Funkmasternickynick7 Elseif is for another condition after the initial "If" statement. You are not limited to the number of elseif's an If statement can have. Else is the "everything else" condition. If the first "If" statement and none of the elseif conditions are met, the program goes to whatever is after "else". You can only have one of these. Pseudo code ex:

    If condition1 then

    'do something

    elseif condition2 then

    'do some other thing

    else

    'sorry, nothing worked!

    end if

  • @Funkmasternickynick7

    if and elseif are the same command but elseif can fit in the if statement to save time and typing

  • Comment removed

  • Comment removed

  • i took your advice from near the end and added the multiply / divide functions =p

  • Comment removed

  • Excellent

  • brownieees XD

  • Great tutorial, thanks!

  • hola esta muy bueno el video

    quiero saber como se hace para cambiar el titulo de la ventana del proyecto

    cambiarle el nombre de FBIDETEMP por otro nombre. por ejemplo "nuevo mundo"

    por favor ayuda

    gracias

  • hola disculpa he visto tu video y me ha gustado mucho

    pero quiero saber como se pone titulo a la ventana del proyecto.

    cambiar la palabra FBIDETEM por otra. como por ejemplo "nuevo mundo"

    ayuda por favor

    gracias......

  • thanks so much for posting . coz mine worked very well .

  • @DarrenS300 well, binary has a lot to do with programming. however, if you're asking if you'll ever have to type in 1's and 0's, the answer is no. The closest you'll get is hex editing or dealing with single bytes of data. Glad you like the vids :)

  • the only problem i got it gives me this wired msg like an error like on your video i keeps doing it any how to fix it??

  • lol forget it bro just figures it out

  • hey man i did extacly what you did on this video but for some reason it doesnt want to complie it and when i want to close it gives me this msg that it isnt done or something any idea why its doing this??

  • hello im 16 but i really like programming how did you start of to be a good programmer becuase i really want to know how to start of cuz i want to be able to do game desgin/game graphcis desgin/ motion graphics what would you recommend for me too use so i could learn like books any websites?? thanks man by the way this is very good vids for basics :D thanks

  • @Distrub122334 Well, the only books I read were the ones that came with visual basic 6 learners edition. Everything else I learned from looking at source code on the internet. Just gotta study and figure it out on your own pretty much, that's the best way IMO. Just a heads up tho, making games isn't nearly as easy as everyone thinks it is, you're in for a lot of work ;) Just keep at it though and you'll get there. Glad you enjoy my vids :)

  • @aznlexusboi26 Sounds very easy, I don't see why you need my help. Everything you need to know to do that is in the first 3 basic tutorials. So what's the problem?

  • what can be done in this code is it just cmd stuff

  • hello I'm 15 years old and want to start programming when I get older...

    like get a job with it and stuffs... Is this a good way to start learning programming?

    Or do u know about a better way of learning programming as young?

  • @battelon this is a good place to start, but all I can really tell you is to try and experience/learn a bit of every language you can (or at least ones that will be used in a commercial setting).

  • lol "I am a tard"

    ...

    .....

    I also like the folder on the desktop called DVD x copy

    hahaha you could do a tutorial on that one too :P

  • mine won't compile! plz help!!!

  • Damn great Vids keep up the good work! I'm really catching on with this programing shit and it impresses the hell out of my friends

  • extremely stupid mistake=adding when supposed to be subtracting :)

  • I USED FBEDIT AHHH, the code in it is much different than FBID this fuked with me for hours!!! till i got it right. now i finnaly have a calculator that does both add and subtract!!! woooo im so glad i didnt give up. im fuking pumped to make more advanced sh!t now. trial and error is really a hard learning process but it worked and now i remember everything i just dd like the back of my hand! WOOT

  • this is pretty cool but i think my 8th grade spotlight class used visual basic last year and we got our calculator to do 4 different things

  • I laughed at my mistakes :

    num 2 with space instead of varibale which was num2

    dum num2

    And

    Print "A" on text and since whilst I was watching I put if choice = 1 and keep hitting a and enter

  • Default types or suffixes are only valid in -lang deprecated or fblite or qb in 'dim choice'

    How do I keep from getting this error?

  • @butch2861 You'd be better off going to the Free Basic forums with that one, I haven't used FB in a long time and I never saw that error :/

  • @butch2861 Did you get end up finding a fix for this? i'm getting the exact same error for every "dim" i put in :S

  • you just are

  • i had the same error.

  • @butch2861 A little late but anyway: Everywhere where the sentece start with "dim" add the phrase "as integer".

    Example: "dim num1" is wrong. Right is "dim as integer num1".

  • @butch2861 You have to declare variables as a specific type in recent versions of FB. For example, "dim choice as integer" should fix your issue.

  • Comment removed

  • @jaywalker512 i finally get it now :D the error was fixed

  • Question jaywalker: I am getting this error on the screen when trying to run this calculator; Default types or suffixes are only valid in -lang deprecated or fblite or qb in 'dim choice' What do I need to do to fix?

  • The most part i like it was taking the Burp man!!! the burp!!!! thats cool man!!!!

  • Quick questions. I made this calculator but I wanted to add a multiplication function to the menu. Do I use the else or the elseif statement? Or is something completely different?

  • @KDALove You would use elseif.

  • Comment removed

  • osrry i posted this here i dont knwo why i can post only in responses but i want to say somehting about this guy Jaywalker512 ....

    Man i bet you where eating pizza with coke IoI !! i love the burp!!! you are cool man!!!! i think you are very funny dude!! love your videos make ore but with a hamburger please i mean it this is not like most boring videos this is funny love you man!!

  • the version of fbide dosnt support the function "elseif" any suggestions??

  • I might be wrong, but as I understand it, in electronics, a PIC microchip is programmed using BASIC. Do you know if I'm right? :P

  • @CoDCopsProductions They can be programmed with basic, but not all of them are/have to be.

  • wow. i'm taking a class online for qbasic and i was curious about what other ones were around so i looked on youtube and found you.

    i really wish my class were taught more like the way you teach this because they're pretty similar and you make a lot more sense (i end up having to read everything five times, and i find mistakes on the pages too)

    also i wanted to mention that I found the brownie comment really funny and ♥ guitars (okay, that's pretty random, i know)

  • @jen564 hehe thanks, glad they've been helpful for you :)

  • who this is hard

  • Do you do programming as a carrer?

  • @blue5880 im only 18 right now, but maybe in the future :p

  • how do you clear the screen within the program in c? The command is clear, but i don't know how to use it the case mentioned above.

  • hey i am wondering. what do you do for your job? and your a good teacher.

  • @Psychtributes I fix guitar amps right now. Not really a "job" since I don't get much money from it, but it's something for now.

  • great tutorial! :P

  • when i press enter after i have my answer, it shows two copies of the "main" menu, and my code is identical to yours. Why is this?

  • Never mind figured it out

    Did not add the code to the sub main

    simple mistake