Other languages > GLBasic - de
Fehlermeldung bei DIM
Worebu:
Moin, ich habe wieder eine Fehlermeldung vom Compiler und weiß nicht weiter. Hat jemand eine Idee?
--- Code: (glbasic) ---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 ***
--- End code ---
Vielen Dank im voraus.
bigsofty:
Can you post some code that produces the error Worebu?
Schranz0r:
Hast du Dim falsch verwendet?
--- Code: (glbasic) ---DIM uni[35][35][35]
--- End code ---
http://www.glbasic.com/xmlhelp.php?lang=de&id=16&action=view
Worebu:
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.
Schranz0r:
LOCAL oder GLOBAL
--- Code: (glbasic) ---LOCAL uni[]
REDIM uni[35][35][35]
--- End code ---
So sollte es gehen.
Navigation
[0] Message Index
[#] Next page
Go to full version