Newbie Help Please

Just starting out? Need help? Post your questions and find answers here.
obelisk
New User
New User
Posts: 7
Joined: Sun Apr 30, 2006 9:40 pm

Newbie Help Please

Post by obelisk »

I just downloaded version 4 beta11 and when I try to compile, I get a compiler error, 'Bad parameter type, number expected instead of string" on the following line.

Code: Select all

winID=OpenWindow(#_win, 0,0, 640,480, #PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_SizeGadget|#PB_Window_TitleBar|#PB_Window_ScreenCentered , "Text")
I've tried different code from this forum and keep getting errors on the openwindow line.

Thanks in advance
User avatar
Joakim Christiansen
Addict
Addict
Posts: 2452
Joined: Wed Dec 22, 2004 4:12 pm
Location: Norway
Contact:

Re: Newbie Help Please

Post by Joakim Christiansen »

Code: Select all

winID=OpenWindow(#_win, 0,0, 640,480, "Text", #PB_Window_SystemMenu|#PB_Window_MinimizeGadget|#PB_Window_MaximizeGadget|#PB_Window_SizeGadget|#PB_Window_TitleBar|#PB_Window_ScreenCentered)
Use the updated help file :wink:

The reason you're getting errors is because the syntax is a little changed in the beta version, and you're trying to run old code.
obelisk
New User
New User
Posts: 7
Joined: Sun Apr 30, 2006 9:40 pm

Post by obelisk »

I see now,

I took for granted that the code would work in all V4 betas.

Thanks
Konne
Enthusiast
Enthusiast
Posts: 434
Joined: Thu May 12, 2005 9:15 pm

Post by Konne »

I think the Debuger output is very clear...
Apart from that Mrs Lincoln, how was the show?
obelisk
New User
New User
Posts: 7
Joined: Sun Apr 30, 2006 9:40 pm

Post by obelisk »

It is clear....now that I know that the syntax has changed.

I'm new to purebasic and so when some code says it was for V4, I thought maybe I was getting errors because I did not install properly.

Thanks for clearing that up.
Dare2
Moderator
Moderator
Posts: 3321
Joined: Sat Dec 27, 2003 3:55 am
Location: Great Southern Land

Post by Dare2 »

Hi obelisk,

Welcome to PureBasic and success with it! It rocks! :)
@}--`--,-- A rose by any other name ..
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

welcome obelisk and... feel the pure power... :)
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Post Reply