Bennu Game Development

English Forums => Helpdesk => Topic started by: Mr.Clean on November 03, 2010, 08:39:22 AM

Title: "Hello World" wont run (yes, im new to this ^_^)
Post by: Mr.Clean on November 03, 2010, 08:39:22 AM
when i try to this hello word code:

[code language="bennu"]import "mod_say"

Process Main()
Begin
   say("Hello World");
End[/code]

i get the following message:

QuoteToo many files specified

> Terminated with exit code 0.

instead of generating the "other" file for the interpreter to read (i think its called the Bytecode)

Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: josebita on November 03, 2010, 08:40:56 AM
How do you compile?
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: Mr.Clean on November 03, 2010, 08:44:48 AM
ctrl + 1 with Crimson Editor
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: josebita on November 03, 2010, 08:54:43 AM
Please make sure the compiler options are set correctly. If that doesn't help, try to compile your code by hand first (bgdc main.prg from the windows console).
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: handsource-dyko on November 03, 2010, 09:04:03 AM
I recommend to compile it manually, and to create a batch or shell script file that does it for you.
It always works for me. I always create two different batch files, one that compiles and runs, and
the other to created a stubbed exe file.

Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: Mr.Clean on November 03, 2010, 09:08:45 AM
Quote from: josebita on November 03, 2010, 08:54:43 AM
Please make sure the compiler options are set correctly. If that doesn't help, try to compile your code by hand first (bgdc main.prg from the windows console).

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\user>C:\Bennu\Bin\bgdc.exe bgdc test.prg
BGDC 1.0.0 (Aug 11 2010 07:46:29)
Copyright ⌐ 2006-2010 SplinterGU (Fenix/BennuGD)
Copyright ⌐ 2002-2006 Fenix Team (Fenix)
Copyright ⌐ 1999-2002 JosΘ Luis Cebrißn Pagⁿe (Fenix)
Bennu Game Development comes with ABSOLUTELY NO WARRANTY;
see COPYING for details

Too many files specified

C:\Documents and Settings\user>
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: EugeneP on November 03, 2010, 09:11:06 AM
C:\Documents and Settings\user>C:\Bennu\Bin\bgdc.exe test.prg
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: Mr.Clean on November 03, 2010, 09:36:37 AM
Quote from: EugeneP on November 03, 2010, 09:11:06 AM
C:\Documents and Settings\user>C:\Bennu\Bin\bgdc.exe test.prg

did that after i copy/pasted test.prg into the bgdc.exe directory and got this:

C:\Documents and Settings\user\test.prg:0: error: test.prg: file not found (EO
F)

could my pc be corrupted?
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: EugeneP on November 03, 2010, 09:59:08 AM
Your PC is OK, 99.9% chance.
You should add to PATH folders containing mod_say.dll or copy all Bennu's dlls to folder containing bgdc.exe
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: josebita on November 03, 2010, 09:59:57 AM
Also, run that command in the directory where test.prg is located (or better, try to configure crinsom editor options better :)).
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: Mr.Clean on November 03, 2010, 11:43:50 AM
in system variables, does PATH have to be small?
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: EugeneP on November 03, 2010, 11:48:14 AM
Quote from: Mr.Clean on November 03, 2010, 11:43:50 AM
in system variables, does PATH have to be small?
Windows environment variables values can be very long, AFAIK. No problems expected here.
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: Windgate on November 03, 2010, 02:24:13 PM
You can't compile that? :o

Dude, just install Bennupack, use its Notepad++ as editor and press F6 to build and run.

No environment vars, no relative paths... Just work.
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: handsource-dyko on November 03, 2010, 06:03:20 PM
I recommend to copy your bennu installation to your project directory.
This way you don't have to worry about the path.

What I always do, is I create a folder my project, and put a copy of bennu's excutable
files and dll's in it. Also, I put a shortcut to cmd.exe in this folder, and change it's
begin in folder properties to the path of the project folder. No, you can type bdgc myprog.prg
and then bgdi myprog.dcb without having to type the entire path. (Wich is annoying especially on
case sensitive systems like linux, where I use a similair fashion, therefore I recommend to only use
lowercase filenames, so you don't have get annoyed by the caps-lock key).


Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: DCelso on November 03, 2010, 08:07:21 PM
Quote from: Mr.Clean on November 03, 2010, 09:08:45 AM
Quote from: josebita on November 03, 2010, 08:54:43 AM
Please make sure the compiler options are set correctly. If that doesn't help, try to compile your code by hand first (bgdc main.prg from the windows console).

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\user>C:\Bennu\Bin\bgdc.exe bgdc test.prg
BGDC 1.0.0 (Aug 11 2010 07:46:29)
Copyright ⌐ 2006-2010 SplinterGU (Fenix/BennuGD)
Copyright ⌐ 2002-2006 Fenix Team (Fenix)
Copyright ⌐ 1999-2002 JosΘ Luis Cebrißn Pagⁿe (Fenix)
Bennu Game Development comes with ABSOLUTELY NO WARRANTY;
see COPYING for details

Too many files specified

C:\Documents and Settings\user>
the problem may be in the crimson editor configuration, the bolded word spare (or leave),
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: Mr.Clean on November 04, 2010, 01:07:38 AM
i decided to try out Bennupack like windgate said and got it from:

http://code.google.com/p/colombiandevelopers/downloads/detail?name=TTools%20R.20%20Installer.rar&can=2&q=

after saving test.prg where the exes were i was able to run it. however, when i press Build Exe and run the exe, it opens and closes quickly, is there a way to make the exe stay open, like a pause command or something?
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: SplinterGU on November 04, 2010, 01:18:33 AM
hi!

please, look this

C:\Documents and Settings\user>C:\Bennu\Bin\bgdc.exe bgdc test.prg

you have an extra "bgdc" in your configuration.

take the suggest that did DCelso, fix your configuration, navegate on configuration options and fix it.
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: SplinterGU on November 04, 2010, 01:19:38 AM
Quote from: Mr.Clean on November 04, 2010, 01:07:38 AM
i decided to try out Bennupack like windgate said and got it from:

http://code.google.com/p/colombiandevelopers/downloads/detail?name=TTools%20R.20%20Installer.rar&can=2&q=

after saving test.prg where the exes were i was able to run it. however, when i press Build Exe and run the exe, it opens and closes quickly, is there a way to make the exe stay open, like a pause command or something?

it's ok

you must do a while with a frame after your write, or your game exit.

edit: oh, sorry, you use say, not write, then you can't get anything on screen... say print to console.
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: Mr.Clean on November 04, 2010, 01:29:11 AM
can you show me the syntax?
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: SplinterGU on November 04, 2010, 05:01:24 AM
begin
write(0,10,10,0,"hello world");
while(!key(_ESC))
frame;
end;
end
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: Mr.Clean on November 04, 2010, 07:49:23 AM
thanks  :D
Title: Re: "Hello World" wont run (yes, im new to this ^_^)
Post by: SplinterGU on November 04, 2010, 02:12:40 PM
y'r wellcome