Hi, folgender Code geht:
GLOBAL counter = 0
DIM a [1]
FOR i = 0 TO 99
a[i] = counter
INC counter,1
DIMPUSH a[],counter
NEXT
FOR i = 0 TO 99
PRINT a[i],100,100
SHOWSCREEN
SLEEP 300
NEXT
Wenn ich nun ein String Array benutze gehts nicht mehr:
GLOBAL counter = 0
DIM a$ [1]
FOR i = 0 TO 99
a$[i] = counter
INC counter,1
DIMPUSH a$[],counter
NEXT
FOR i = 0 TO 99
PRINT a$[i],100,100
SHOWSCREEN
SLEEP 300
NEXT
Quote_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.2007.363 - 3D, NET
Wordcount:10 commands
compiling:
C:\Users\Fabio\AppData\Local\Temp\glbasic\gpc_temp0.cpp: In function `int __GLBASIC__::__MainGameSub_()':
C:\Users\Fabio\AppData\Local\Temp\glbasic\gpc_temp0.cpp:12: error: no matching function for call to `DIMPUSH(__GLBASIC__::DGStrArray&, DGInt&)'
C:/Basic/GLBasic/Compiler/platform/Include/glb.h:462: note: candidates are: void __GLBASIC__::DIMPUSH(__GLBASIC__::DGIntArray&, DGInt)
C:/Basic/GLBasic/Compiler/platform/Include/glb.h:467: note: void __GLBASIC__::DIMPUSH(__GLBASIC__::DGArray<__GLBASIC__::DGStr>&, __GLBASIC__::CGStr)
*** FATAL ERROR - Bitte die Compiler-Ausgabe ins Forum kopieren
_______________________________________
*** Fertig ***
Zeit: 0.6 sek
Erstellen: 0 erfolgreich
*** 1 FEHLGESCHLAGEN ***
Jopp, stinkt nach Käfer :D
Puh, hatte schon selbstzweifel :)
DIMPUSH a$[],counter+""
*ducken und rennen *
nächste Version, dann, OK? ;)
Danke, geht.
Mach mal Wochenende :)
^^ ist ja übel :)