Hello, in this article I am going to show you a trick in BlitzBasic coding.
First off, BlitzBasic is a language used for making games.
Second of all, please do not
try to make a program using BlitzPlus it is not made for anything other than making games.
_______________________________________________
Now for the fun stuff ;)
Parts of this article:
Part 1: Intro
Part 2: The program
Part 3: How the program works
Part End: Last of article
------------------------Part 1-------------------------
Introduction to BlitzPlus/Basic
Hello, BlitzBasic is a very, very easy to understand language. I am almost positive you will follow along but if you don't please go to Part 3 for a step by step guide to this tutorial. Okay now it is very easy to learn BlitzBasic, all you have to do to print 'Hello World' is this
Print "Hello World"
delay 5000
Now wasn't that easy if not just hang on I will tell you about it in Part 3.
--------------------------Part 2------------------------
The Program.
;pass.exe - password protect
AppTitle "passbox"
;asks user the pass
hehe = Input$("What is the password? ")
;var
lol = 11514251514
ha$ = "'http://somesite.org'"
;looks to see if pass was right
.password
If hehe = lol Then
Print "correct!"
Delay 500
Print "your link is " + ha + "!"
Delay 50000
End
;tells user to guess again
Else
Print "You have 3 trys left!"
Print ""
hehe = Input$("What is the password? ")
Goto password1
EndIf
;looks to see if pass was right
.password1
If hehe = lol Then
Print "correct!"
Delay 500
Print "your link is " + ha + "!"
Delay 50000
End
;askes user to guess again
Else
Print "You have 2 trys left!"
Print ""
hehe = Input$("What is the password? ")
Goto password2
EndIf
;looks to see if pass was right
.password2
If hehe = lol Then
Print "correct!"
Delay 500
Print "your link is " + ha + "!"
Delay 50000
End
;askes user to guess again
Else
Print "You have 1 try left!"
Print ""
hehe = Input$("What is the password? ")
Goto passwordend
EndIf
;looks to see if pass was right
.passwordend
If hehe = lol Then
Print "correct!"
Delay 500
Print "your link is " + ha + "!"
Delay 50000
End
;tells user he can't guess any more
Else
Print "You have 0 trys left!"
Delay 250
Print "This will end in 2.5 seconds"
EndIf
;waits 2.5 seconds, then ends
Delay 2500
End
-----------------------Part 3--------------------------
How passbox.exe works
' ; ' means this comment
' print ' means print text
' input$ ' means type something (in numbers)
' lol ' this is a variable
' ha$ ' this is a variable
' delay ' means how many milliseconds go by before it goes to the next command.
' goto ' Never use this!
' hehe ' this names the the line as in
hehe = Input$("What is the password? ")
' .sometext ' this names the block
' apptitle ' names the application
' end ' ends program instantly
' if ' this is what happens if condition is true
' else ' this is what happens when condition is false
' endif ' ends the if...else loop
-----------------------Part End------------------------
Last of this article
I hope you liked it.
First off, BlitzBasic is a language used for making games.
Second of all, please do not
try to make a program using BlitzPlus it is not made for anything other than making games.
_______________________________________________
Now for the fun stuff ;)
Parts of this article:
Part 1: Intro
Part 2: The program
Part 3: How the program works
Part End: Last of article
------------------------Part 1-------------------------
Introduction to BlitzPlus/Basic
Hello, BlitzBasic is a very, very easy to understand language. I am almost positive you will follow along but if you don't please go to Part 3 for a step by step guide to this tutorial. Okay now it is very easy to learn BlitzBasic, all you have to do to print 'Hello World' is this
Print "Hello World"
delay 5000
Now wasn't that easy if not just hang on I will tell you about it in Part 3.
--------------------------Part 2------------------------
The Program.
;pass.exe - password protect
AppTitle "passbox"
;asks user the pass
hehe = Input$("What is the password? ")
;var
lol = 11514251514
ha$ = "'http://somesite.org'"
;looks to see if pass was right
.password
If hehe = lol Then
Print "correct!"
Delay 500
Print "your link is " + ha + "!"
Delay 50000
End
;tells user to guess again
Else
Print "You have 3 trys left!"
Print ""
hehe = Input$("What is the password? ")
Goto password1
EndIf
;looks to see if pass was right
.password1
If hehe = lol Then
Print "correct!"
Delay 500
Print "your link is " + ha + "!"
Delay 50000
End
;askes user to guess again
Else
Print "You have 2 trys left!"
Print ""
hehe = Input$("What is the password? ")
Goto password2
EndIf
;looks to see if pass was right
.password2
If hehe = lol Then
Print "correct!"
Delay 500
Print "your link is " + ha + "!"
Delay 50000
End
;askes user to guess again
Else
Print "You have 1 try left!"
Print ""
hehe = Input$("What is the password? ")
Goto passwordend
EndIf
;looks to see if pass was right
.passwordend
If hehe = lol Then
Print "correct!"
Delay 500
Print "your link is " + ha + "!"
Delay 50000
End
;tells user he can't guess any more
Else
Print "You have 0 trys left!"
Delay 250
Print "This will end in 2.5 seconds"
EndIf
;waits 2.5 seconds, then ends
Delay 2500
End
-----------------------Part 3--------------------------
How passbox.exe works
' ; ' means this comment
' print ' means print text
' input$ ' means type something (in numbers)
' lol ' this is a variable
' ha$ ' this is a variable
' delay ' means how many milliseconds go by before it goes to the next command.
' goto ' Never use this!
' hehe ' this names the the line as in
hehe = Input$("What is the password? ")
' .sometext ' this names the block
' apptitle ' names the application
' end ' ends program instantly
' if ' this is what happens if condition is true
' else ' this is what happens when condition is false
' endif ' ends the if...else loop
-----------------------Part End------------------------
Last of this article
I hope you liked it.