Page 1 of 1

Newbie Help Please

Posted: Thu May 04, 2006 3:03 am
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

Re: Newbie Help Please

Posted: Thu May 04, 2006 3:08 am
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.

Posted: Thu May 04, 2006 3:18 am
by obelisk
I see now,

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

Thanks

Posted: Thu May 04, 2006 4:19 am
by Konne
I think the Debuger output is very clear...

Posted: Thu May 04, 2006 12:29 pm
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.

Posted: Thu May 04, 2006 12:43 pm
by Dare2
Hi obelisk,

Welcome to PureBasic and success with it! It rocks! :)

Posted: Thu May 04, 2006 1:19 pm
by Flype
welcome obelisk and... feel the pure power... :)