Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - johngood

#1
Hi,

un-installed GLBasic SDK 8.148
Installed GLBasic SDK 8.078
Upgraded to GLBasic SDK 8.148

Everything is back to normal... :good:
Thank You.

Regards,
johngood.
#2
Hi,

I don't know which version of the compiler you are using!
I have loaded a Sample file 'DarwSprite' which has a normal PRINT Statement:

PRINT "Bubble-Size x: "+sx+" y: "+sy,0,400

and I get...
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.8.110 SN:5fa0132f - 3D, NET
Wordcount:24 commands
compiling:

linking:
gpc_temp0.o:gpc_temp0.cpp:(.text+0x391): undefined reference to `__GLBASIC__::PRINT(__GLBASIC__::DGStr const&, double, double, int)'
*** FATAL ERROR - Please post this output in the forum

I think something has gone wrong with my upgrade from 8.126 to 8.148! ;)
Do I just extract 'backup-8.125.zip' into the GLBasic Directory and test it then Upgrade again? ;/

johngood
#3
Hi MrTAToad,

You are partly right 4 of the Errors are due to copy code from Uncle's 'iPhone Touch Feature Example'
namely the 'FUNCTION printMouseStatus:id,x,y'

The other two come from my following function:

FUNCTION Panim: ax,ay,a
LOCAL i,x,y
x = ax
y = ay
IF frame > 6 THEN Pcell(5,5,13)
PRINT ax,120,100   //---------> This line causes 1 Error see below  ::)
PRINT ay,120,140     //---------> This line causes 1 Error see below  ::)
x = x * cellsize
y = y * cellsize
   IF frame < 7
   DRAWANIM a,frame,x,y
   ENDIF
ENDFUNCTION

gpc_temp0.o:gpc_temp0.cpp:(.text+0x19fe): undefined reference to `__GLBASIC__::PRINT(__GLBASIC__::DGStr const&, double, double, int)'
gpc_temp0.o:gpc_temp0.cpp:(.text+0x2835): undefined reference to `__GLBASIC__::PRINT(__GLBASIC__::DGStr const&, double, double, int)'
*** FATAL ERROR - Please post this output in the forum

johngood.
#4
Bug Reports / GLBasic 8.148
2010-Oct-30
Hi,
My program was compiled yesterday with no Errors!
Today after upgrading to 8.148 I get this. :S
_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.8.110 SN:5fa0132f - 3D, NET
Wordcount:330 commands
compiling:

linking:
gpc_temp0.o:gpc_temp0.cpp:(.text+0x21fe): undefined reference to `__GLBASIC__::PRINT(__GLBASIC__::DGStr const&, double, double, int)'
gpc_temp0.o:gpc_temp0.cpp:(.text+0x2258): undefined reference to `__GLBASIC__::PRINT(__GLBASIC__::DGStr const&, double, double, int)'
gpc_temp0.o:gpc_temp0.cpp:(.text+0x34cc): undefined reference to `__GLBASIC__::PRINT(__GLBASIC__::DGStr const&, double, double, int)'
gpc_temp0.o:gpc_temp0.cpp:(.text+0x35b8): undefined reference to `__GLBASIC__::PRINT(__GLBASIC__::DGStr const&, double, double, int)'
gpc_temp0.o:gpc_temp0.cpp:(.text+0x36b3): undefined reference to `__GLBASIC__::PRINT(__GLBASIC__::DGStr const&, double, double, int)'
gpc_temp0.o:gpc_temp0.cpp:(.text+0x37a0): more undefined references to `__GLBASIC__::PRINT(__GLBASIC__::DGStr const&, double, double, int)' follow
*** FATAL ERROR - Please post this output in the forum
_______________________________________
*** Finished ***
Elapsed: 8.4 sec. Time: 12:23
Build: 0 succeeded.
*** 1 FAILED ***


johngood.
#5
Hi,

As we have had an update to the GLBasic SDK 8.120 and the option for 960x640 Retina Display Iphone 4
has not been included can I ask if you will be offering it at a later date?  :doubt:

Regards,
Johngood.
#6
FAQ / Re: iPod Touch 4G 32GB
2010-Sep-25

Hi matchy,

No I have not tried xcode yet as I have been updating my developers subscription and trying my existing applications on the iPod Touch 4G.
I am looking forward to viewing my apps in the higher resolution soon I hope. :D

Regards,
John.
#7
FAQ / iPod Touch 4G 32GB
2010-Sep-24

Hi,
I have just received my new iPod Touch 4G iOS 4.1 32GB its Magic!

It has a 960x640-pixel resolution at 326 pixels per inch, do you have a time scale for adding this option to GLBasic? :)

Best Regards,
John.
#8
Thanks Moru,
Thats what happens when you block copy TYPE definitions!   ;/

The ship array should have been:
Global ship AS SHIP

As there is only one ship in the game.

regards,
johngood
#9
Hi it's me again  O_O
At the moment I am working another game and I am Having more problems with TYPE'S again  :sick:

I have created this small program to simplify debugging
if I enable the line PRINT Ship.xpos,100,130 I get the Error below!

With the same line commented out all is fine even the call to InitShip()
does not generate any Errors!
The same happens with Pilot[]
I have also tried it in Version 7.138, no difference.

Regards,
johngood.



Code (glbasic) Select


// --------------------------------- //
// Project: TypeProblem
// Start: Saturday, October 10, 2009
// IDE Version: 6.248

GLOBAL mx%, my%, imouse%, b1%, b2%

TYPE tMouse
x%
y%
active%
ENDTYPE
GLOBAL Mouse[] AS tMouse

DIM Mouse[5]

TYPE SHIP
    xpos
    ypos
    enabled
ENDTYPE

GLOBAL Ship[] AS SHIP
GLOBAL Pilot[] AS SHIP



SETSCREEN 640,480,0
LIMITFPS 30
InitShip()

// Main loop
WHILE KEY(1) = FALSE
UpdateMice()
PRINT "Mouse  X   Y",40,70
PRINT Mouse[0].x, 100,100
PRINT Mouse[0].y, 130,100
//PRINT Ship.xpos,100,130
SHOWSCREEN

WEND



FUNCTION InitShip:
LOCAL dumy AS SHIP
dumy.xpos = 240
dumy.ypos = 600
dumy.enabled = 1
DIMPUSH Ship[], dumy
ENDFUNCTION

FUNCTION UpdateMice:
MOUSESTATE mx,my,b1,b2
Mouse[0].x = mx
Mouse[0].y = my
ENDFUNCTION







compiling:
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp: In function `int __GLBASIC__::__MainGameSub_()':
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:24: error: 'class __GLBASIC__::DGArray<__GLBASIC__::SHIP>' has no member named 'xpos'
*** FATAL ERROR - Please post this output in the forum
#10
Thanks to you MrTAToad. :good:

That fixed that error!

I do hope you are not going on holiday as I still have four Functions to debug! ;/

Thanks once again for your much needed help.

Best Regards,
johngood.

#11
Hi MrTAToad,

Thanks for persisting with me.  =D

Here are my declarations and the Function


TYPE SPIDERDATA
   xpos
   ypos
   animframe
   animcount
   animpause
   speed
   hit
ENDTYPE

GLOBAL spiderdata[] AS SPIDERDATA

GLOBAL Enemy[] AS SPIDERDATA


FUNCTION DrawEnemies:
LOCAL Enm AS SPIDERDATA  // also tried spiderdata
   FOREACH Enm IN  Enemy[]
      DRAWANIM 8,Enm.animframe,Enm.xpos,Enm.ypos
      Enm.animcount = Enm.animcount + 1
      IF Enm.animcount > Enemy_Anim_Pause
         Enm.animcount = 1
         IF Enm.hit = FALSE
            Enm.animframe = 1 - Enm.animframe
         ELSE
            Enm.animframe = Enm.animframe + 1
            IF Enm.animframe >7
               DELETE Enm
            ENDIF
         ENDIF
      ENDIF
      IF Enm
         Enm.ypos = Enm.ypos - Enm.speed
         IF Enm.ypos <15
            GameOver = TRUE
            DELETE Enm
         ENDIF
      ENDIF
   NEXT
ENDFUNCTION


Regards,
johngood.

Code (glbasic) Select

compiling:
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp: In function `DGInt __GLBASIC__::DrawEnemies()':
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:274: error: could not convert `Enm' to `bool'
*** FATAL ERROR - Please post this output in the forum
#12
Hi,
Why am I getting the following Precompiling Error?

C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp: In function `DGInt __GLBASIC__::DrawEnemies()':
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:255: error: could not convert `Enm' to `bool'

It has been there in all the above Precompiling outputs.  :sick:

johngood
#13

The Errors are getting smaller or is it that I am getting older. ;/
Why was I getting Enemy bool  Error in my earlier posts
The Error is still there enm bool Error because I replaced Enemy with enm?

Regards,
johngood.




Code (glbasic) Select

compiling:
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp: In function `DGInt __GLBASIC__::DrawEnemies()':
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:255: error: could not convert `Enm' to `bool'
*** FATAL ERROR - Please post this output in the forum
#14
Sorry guys I keep forgetting how case sensitive GLBasic is, it does no have a Case switch! :whistle:

I have been commenting all the routines out and debugging them one at a time.
I am learning a lot from you guys thanks. :good:

I am stuck at the FUNCTION DrawEnemies.

I have not called DrawEnemies in the code but I have un-commented the Function and it generates
the Errors below

FUNCTION DrawEnemies:
   FOREACH Enemy IN  Enemy[]
      DRAWANIM 8,Enemy.animframe,Enemy.xpos,Enemy.ypos
      Enemy.animcount = Enemy.animcount + 1
      IF Enemy.animcount > Enemy_Anim_Pause
         Enemy.animcount = 1
         IF Enemy.hit = FALSE
            Enemy.animframe = 1 - Enemy.animframe
         ELSE
            Enemy.animframe = Enemy.animframe + 1
            IF Enemy.animframe >7
               DELETE Enemy
            ENDIF
         ENDIF
      ENDIF
      IF Enemy
         Enemy.ypos = Enemy.ypos - Enemy.speed
         IF Enemy.ypos <15
            GameOver = TRUE
            DELETE Enemy
         ENDIF
      ENDIF
   NEXT
   
ENDFUNCTION


Regards,
johngood.

Code (glbasic) Select

compiling:
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp: In function `DGInt __GLBASIC__::DrawEnemies()':
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:221: error: no match for call to `(__GLBASIC__::SpiderData) (int)'
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:247: error: no matching function for call to `DIMDEL(__GLBASIC__::SpiderData&, int&)'
C:/Program Files/GLBasic/Compiler/platform/Include/glb.h:788: note: candidates are: void __GLBASIC__::DIMDEL(__GLBASIC__::DGIntArray&, int)
C:/Program Files/GLBasic/Compiler/platform/Include/glb.h:798: note:                 void __GLBASIC__::DIMDEL(__GLBASIC__::DGNatArray&, int)
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:255: error: could not convert `Enemy' to `bool'
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:266: error: no matching function for call to `DIMDEL(__GLBASIC__::SpiderData&, int&)'
C:/Program Files/GLBasic/Compiler/platform/Include/glb.h:788: note: candidates are: void __GLBASIC__::DIMDEL(__GLBASIC__::DGIntArray&, int)
C:/Program Files/GLBasic/Compiler/platform/Include/glb.h:798: note:                 void __GLBASIC__::DIMDEL(__GLBASIC__::DGNatArray&, int)
*** FATAL ERROR - Please post this output in the forum
#15
Thanks for your quick response MrTAToad  =D

With your help I have the following:

LOADANIM "gfx/spider_shapes.bmp",1,16,16

TYPE SpiderData
   xpos
   ypos
   animframe
   animcount
   animpause
   speed
   hit
ENDTYPE

GLOBAL spiderdata[] AS spiderdata

GLOBAL Enemy[] AS SpiderData

bla bla

FUNCTION InitEnemy:
   LOCAL dummy AS SpiderData   
   dummy.xpos              = RND(100)
   dummy.ypos              = Enemy_Ypos_Start
   dummy.speed             = 1
   dummy.animframe         = 0
   dummy.animcount         = 1
   dummy.animpause         = 4
   dummy.hit               = FALSE
   DIMPUSH Enemy[], dummy
ENDFUNCTION

FUNCTION DrawEnemies:
   FOREACH Enemy IN  Enemy[]
      DRAWANIM 1,Enemy.animframe,Enemy.xpos,Enemy.ypos
      Enemy.animcount = Enemy.animcount + 1   
      IF Enemy.animcount > Enemy_Anim_Pause
         Enemy.animcount = 1
         IF Enemy.hit = FALSE
            Enemy.animframe = 1 - Enemy.animframe
         ELSE
            Enemy.animframe = Enemy.animframe + 1
            IF Enemy.animframe >7
               DELETE Enemy
            ENDIF//Enemy.animframe
         ENDIF
      ENDIF
      IF Enemy
         Enemy.ypos = Enemy.ypos - Enemy.speed
         IF Enemy.ypos <15
            GameOver = TRUE
            DELETE Enemy
         ENDIF
      ENDIF
   NEXT
ENDFUNCTION

This is what the compiler produces!    :'(

Regards,
johngood.


Code (glbasic) Select

In file included from C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_tempg.cpp:2:
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp.h:17: error: `spiderdata' was not declared in this scope
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp.h:17: error: template argument 1 is invalid
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp.h:17: error: ISO C++ forbids declaration of `spiderdata' with no type
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_tempg.cpp:6: error: type/value mismatch at argument 1 in template parameter list for`template<class T> class __GLBASIC__::DGArray'
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_tempg.cpp:6: error:   expected a type, got `__GLBASIC__::spiderdata'
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_tempg.cpp:6: error: invalid type in declaration before ';' token
In file included from C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:1:
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp.h:17: error: `spiderdata' was not declared in this scope
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp.h:17: error: template argument 1 is invalid
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp.h:17: error: ISO C++ forbids declaration of `spiderdata' with no type
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp: In function `DGInt __GLBASIC__::DrawEnemies()':
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:242: error: no match for call to `(__GLBASIC__::SpiderData) (int)'
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:268: error: no matching function for call to `DIMDEL(__GLBASIC__::SpiderData&, int&)'
C:/Program Files/GLBasic/Compiler/platform/Include/glb.h:788: note: candidates are: void __GLBASIC__::DIMDEL(__GLBASIC__::DGIntArray&, int)
C:/Program Files/GLBasic/Compiler/platform/Include/glb.h:798: note:                 void __GLBASIC__::DIMDEL(__GLBASIC__::DGNatArray&, int)
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:279: error: could not convert `Enemy' to `bool'
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp: In function `DGInt __GLBASIC__::CheckCollision()':
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\glbasic\gpc_temp0.cpp:313: error: no match for call to `(__GLBASIC__::SpiderData) (int)'
*** FATAL ERROR - Please post this output in the forum