Moin, ich habe wieder eine Fehlermeldung vom Compiler und weiß nicht weiter. Hat jemand eine Idee?
GPC - GLBasic Precompiler V.17.312 SN: 04eb7bb - 3D, NET
Wordcount:37 commands
compiling:
F:\Temp\glbasic\gpc_temp0.cpp: In function 'int __GLBASIC__::__MainGameSub_()':
F:\Temp\glbasic\gpc_temp0.cpp:26:18: error: no matching function for call to 'DIM(DGInt&, int, int, int)'
DIM(uni, 35,35,35);
^
In file included from F:\Temp\glbasic\gpc_temp.h:2:0,
from F:\Temp\glbasic\gpc_temp0.cpp:1:
E:\Games\steamapps\common\GLBasic_SDK\Compiler\platform\Include/glb.h:825:25: note: candidate: template<class T> void __GLBASIC__::DIM(__GLBASIC__::DGArray<T>&, DGNat, DGNat, DGNat, DGNat)
template <class T> void DIM(DGArray<T>& arr, DGNat xt1, DGNat xt2=0, DGNat xt3=0, DGNat xt4=0) {
^
E:\Games\steamapps\common\GLBasic_SDK\Compiler\platform\Include/glb.h:825:25: note: template argument deduction/substitution failed:
F:\Temp\glbasic\gpc_temp0.cpp:26:18: note: mismatched types '__GLBASIC__::DGArray<T>' and 'DGInt {aka double}'
DIM(uni, 35,35,35);
^
In file included from F:\Temp\glbasic\gpc_temp.h:2:0,
from F:\Temp\glbasic\gpc_temp0.cpp:1:
E:\Games\steamapps\common\GLBasic_SDK\Compiler\platform\Include/glb.h:942:9: note: candidate: void __GLBASIC__::DIM(__GLBASIC__::DGIntArray&, DGNat, DGNat, DGNat, DGNat)
void DIM(DGIntArray& arr, DGNat xt1, DGNat xt2=0, DGNat xt3=0, DGNat xt4=0);
^
E:\Games\steamapps\common\GLBasic_SDK\Compiler\platform\Include/glb.h:942:9: note: no known conversion for argument 1 from 'DGInt {aka double}' to '__GLBASIC__::DGIntArray&'
E:\Games\steamapps\common\GLBasic_SDK\Compiler\platform\Include/glb.h:943:9: note: candidate: void __GLBASIC__::DIM(__GLBASIC__::DGNatArray&, DGNat, DGNat, DGNat, DGNat)
void DIM(DGNatArray& arr, DGNat xt1, DGNat xt2=0, DGNat xt3=0, DGNat xt4=0);
^
E:\Games\steamapps\common\GLBasic_SDK\Compiler\platform\Include/glb.h:943:9: note: no known conversion for argument 1 from 'DGInt {aka double}' to '__GLBASIC__::DGNatArray&'
F:\Temp\glbasic\gpc_temp0.cpp: In function 'void __GLBASIC__::Universum()':
F:\Temp\glbasic\gpc_temp0.cpp:100:10: error: '__GLBASIC__::uni' cannot be used as a function
uni(x,y,z) = RND(400);
^
*** FATAL ERROR - Bitte die Compiler-Ausgabe ins Forum kopieren
_______________________________________
*** Fertig ***
Dauer: 1.3 sek. Zeit: 10:29
Erstellen: 5 erfolgreich.
*** 16 FEHLGESCHLAGEN ***
Vielen Dank im voraus.
Can you post some code that produces the error Worebu?
Hast du Dim falsch verwendet?
DIM uni[35][35][35]
http://www.glbasic.com/xmlhelp.php?lang=de&id=16&action=view
Hi, sorry für die späte Meldung.
Ich mache es genauso wie beschrieben,
wenn ich unter den Optionen "Explizite Deklaration" ausschalte, ist alles gut. Wie deklariere ich den ein solch ein Feld?
Danke.
LOCAL oder GLOBAL
LOCAL uni[]
REDIM uni[35][35][35]
So sollte es gehen.
uni wurde als Integer erkannt, nicht als array. Schreib LOCAL uni[] davor.
ah, ok.Danke