Help me

Blitz3D Forums/Blitz3D Programming/Help me

Iso(Posted 2004) [#1]
Hey, im new to Blitz 3d and really need to know why my program suddenly ends!

i have this code:
text1$="Hello"
print("Hello")

But then it just ends. I want it to pause and only end when u hit esc.Plz help me.


Bot Builder(Posted 2004) [#2]
Welcome to blitz :D

Blitz programs automatically end if there is no more code to execute, so you have to have it pause or loop (as you would have it do in a game).

text1$="Hello"
Print text1$
WaitKey


Probably the simplest way, this'll end on any key press.

text1$="Hello"
Print text1$

While Not Keyhit(1)
Wend


A little more complex, this will print the message and then loop while checking to see if you hit escape. (Key code 1).


Iso(Posted 2004) [#3]
Wow,awsome. Now, i need 2 know, how do i make it that if they press the y key it exits if they press the n key it displays the message "Ok"

and also, how do u kow that the escape key is 1? thats weird,could u plz explain?


Spacemonkey(Posted 2004) [#4]


how do u kow that the escape key is 1? thats weird,could u plz explain?
- look under keyboard scancodes


Rob Farley(Posted 2004) [#5]
One Three Three Seven Underscore G at Bar Slash Slash Bar Three Bar Z

How are you supposed to pronounce that?

Go to the blitz help and look at the scan code list or the scan code picker in the command reference. That'll tell you all the scan codes.

Now whilst you're in the help look at the keyhit and keydown commands.

After your waitkey check for a keydown for the scancodes for Y and N as I don't know them off the top of my head.

So you end up with:
waitkey
if keyhit(["Y" Scancode]) then print "You pressed Y"
if keyhit(["N" scancode]) then print "You pressed N"
or you could do..
waitkey
if keyhit(["Y" scancode])
     Print "You pressed Y"
else
     print "You pressed something else"
endif


Again you'll put a waitkey after that or it'll just end again.


Iso(Posted 2004) [#6]
wow. yeah, 2day i got my Blitz 3d and im only 13 :) and also i have been told i may be getting a scolarship to continue my education at my VERY expensive skool. its bin a good day.


poopla(Posted 2004) [#7]
1337, make sure you go through all thr tutorials that come with blitz, and take the time to understand them. That will get you on your way alot faster then asking here!

Good luck with you blitzing.


GfK(Posted 2004) [#8]
i have been told i may be getting a scolarship to continue my education at my VERY expensive skool. its bin a good day
Perhaps they'll teach you how to spell?


Iso(Posted 2004) [#9]
Hey hey man, i cant b stuffed spellin on a forum, u can read it cant u? if u cant ur dumb. But ne way, is it possible to add a title to the window? U know wat i mean, like right up the top in the window.


Rob Farley(Posted 2004) [#10]
OneThreeThreeSeven,

I would suggest that with an attitude like that you're not going to receive a whole lot of help.

I stuggle to understand what you've written, I assumed English wasn't your first language. Now I see you're from New Zealand so I would have hoped you had a pretty good grasp.


GfK(Posted 2004) [#11]
Yes, "Ieet_Gaiviels", Rob Farley is right.


SoggyP(Posted 2004) [#12]
Hi Folks,

It's quite odd but I eat gavels as well! What a coincidence.

Later,

Jes


Sweenie(Posted 2004) [#13]
"Leet_Gomez" perhaps?


boomboom(Posted 2004) [#14]
yes, leet_gibblets, you can only be rude on a forum if you are in the top 5% of talent. Its like an unwritten law, that is why I am usually pollite.

All these guestions you are asking are very easily solved by reading the meanual and following the tutorials.

Also it is very useful to just spend a day reading through all the commands, just so you can get a jist for what they do.


Rook Zimbabwe(Posted 2004) [#15]
One Three Three Seven Underscore G at Bar Slash Slash Bar Three Bar Z...
He is simply a 14 year old noob... trying to look like a 733+ H@x09| and obviously 'haint!!! I mean if he doesn't even understand WHILE/WEND...

1337_G@|\/|3|z (Posted 2004-08-19 03:35:59)

Hey hey man, i cant b stuffed spellin on a forum, u can read it cant u? if u cant ur dumb. But ne way, is it possible to add a title to the window? U know wat i mean, like right up the top in the window.

READ THE DOCS AND HELPFILES... look for APPtitle... READ ALL THE 2D and then read the 3D... Play with the SCANCODES PICKER...

Then come ask silly questions like me.

-Z


Picklesworth(Posted 2004) [#16]
Oh well, we all start at some point. I just fortunately for you guys didn't use the forum when I first got blitz3d :D

Okay 1337, blitz is quite easy to learn. There's some great beginner tutorials at www.blitzcoder.com in the articles section. Don't be afraid to look at 2d tutorials also, as they can hold some very nice information.
Also, in the blitz3d help (the starting screen) click language referance. That should give you a good idea of the basics.

Oh, and in your account page, find edit profile, and you can change your nick name if you want (combinations of nearly random seeming letters and numbers aren't very well recieved apparently...) Just some word and a bunch of numbers to follow should work fine. But don't do that too often like The Dude (at least I think that's his name right now).

u can read it cant u? if u cant ur dumb

Lol, I can name a few people here who need to be told that that :D


Damien Sturdy(Posted 2004) [#17]
Welcome!

Calm the attitude, if you have a funny name, it will be picked on. Take it as a joke. The vast majority of us around here are friendly people :D

I recommend searching through the docs too, best way to learn IMHO is to play with the demo code!


Iso(Posted 2004) [#18]
Hey HEy hey! now im confused again :|
look at dis:

AppTitle("Game Legacy")
Color Rnd(0,100),Rnd(0,240),Rnd(0,1)
Text 0,0,"Hey"

Color Rnd(0,0),Rnd(0,255),Rnd(0,0)
Text 0,200 [error here] "Ho"
Stop

well, when i goto run this app it says "excpecting end-of-line" i have NO idea wat dat means. Plz hlp me.

Ps. Im gonna try 2 change my name.


gpete(Posted 2004) [#19]
put a comma in where you wrote - [error here] -

just look up two lines and see how you entered it before.


Iso(Posted 2004) [#20]
o, silly me, so now i no wat an end of line is :) thnx man


Andy(Posted 2004) [#21]
iso,

>Hey hey man, i cant b stuffed spellin on a forum, u can >read it cant u?

There are propably people from atleast 50 different nations and the one thing they have in common is that they know some english... They learned the words 'any', 'your', 'what', 'thanks' etc, not 'ne', 'ur', 'wat' and thnx'.

When you communicate it is your responsibility to make certain that your intended recipient understands what you are saying. If you can't write in english, then many people won't be able to understand you and thus won't be able to help you.

>if u cant ur dumb.

No, if people can't read what you write, then you have failed to make yourself understood. Infants have no real language, but a 14 year old is supposed to be able to make him/herself understood.

Writing an incoherent english and calling people stupid is disrespectful, and you'll find that being disrespectful is not very well received on a forum.

On another note, it is helpful if you describe your problem in the subject instead of simply calling it 'Help Me'... Something like 'why does my program end?' etc.

Welcome to Blitz.

Andy


Iso(Posted 2004) [#22]
ok, srry, i mean sorry for the bad attitude, im just in a real bad mood at the moment because of my impacted wisdom teeth. Im getting them taken out in 2 days but they REALLY hurt. I also have an infection in my throat,my glands are up and i have an infected thumb because i slammed it in a door. But ill be more socialy acceptable. ( i hope i spelt that right)


jfk EO-11110(Posted 2004) [#23]
As people said, first try to find the answers in the docs, using the Help Tab Button and then select the command reference.

Additionally, there is a beginner section in this forum. If you have basic questions, you better ask there, so none will feel disturbed.