READSTR 1,var

Previous topic - Next topic

uPd4t3d Data

Servus!

das soll ich ins Forum kopieren...

*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.2007.159 - 3D, NET
Wordcount:106 commands

compiling:
C:/DOKUME~1/Admin/LOKALE~1/Temp/glbasic/gpc_temp0.cpp: In function `int __GLBASIC__::__MainGameSub_()':
C:/DOKUME~1/Admin/LOKALE~1/Temp/glbasic/gpc_temp0.cpp:94: error: invalid initialization of reference of type '__GLBASIC__::DGStr&' from expression of type 'DGInt'
C:/Programme/GLBasic/Compiler/platform/Include/glb.h:490: error: in passing argument 2 of `void __GLBASIC__::READSTR(DGInt, __GLBASIC__::DGStr&, DGInt)'
*** FATAL ERROR - Bitte die Compiler-Ausgabe ins Forum kopieren

Gruss
Data

D2O

Na Hallo mal hier ;)

Kannst Du auch den dazu gehörigen Code Posten?
Hast Du Var auch als Var$ geschrieben?
Hast Du auch die Anzahl der Bytes dazugeschrieben?


HIer mal ein Beispiel was funktionier.
Gebraucht wird nur noch eine Text datei (1.txt) in der steht "Hallo D2O"   ohne die "
Code (glbasic) Select

OPENFILE(0,"1.txt",TRUE)

READSTR 0,var$,9


PRINT var$,10,10
SHOWSCREEN
KEYWAIT

CLOSEFILE 0
I7 2600K; 8 GB RAM ; Win10 Pro x64 | NVidia GTX 750 TI 2048MB ; Realtec OnBoard Sound;
Lenovo ThinkPad T400: XP Pro
GLB Premium-immer Aktuell

Schranz0r

#2
Quote from: D²O on 2008-Sep-13
Hast Du Var auch als Var$ geschrieben?

Kann ich dir beantworten:
Nein hatter nicht!

error: invalid initialization of reference of type '__GLBASIC__::DGStr&' from expression of type 'DGInt'
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

D2O

Quote from: Schranz0r on 2008-Sep-13
Quote from: D²O on 2008-Sep-13
Kannst Du auch den dazu gehörigen Code Posten?

Kann ich dir beantworten:
Nein hatter nicht!

error: invalid initialization of reference of type '__GLBASIC__::DGStr&' from expression of type 'DGInt'

Versteh Dich jetzt nicht.  :S
Die meldung kommt doch wenn man das $ vergessen hat.
I7 2600K; 8 GB RAM ; Win10 Pro x64 | NVidia GTX 750 TI 2048MB ; Realtec OnBoard Sound;
Lenovo ThinkPad T400: XP Pro
GLB Premium-immer Aktuell

Schranz0r

genau das hab ich damit gesagt!
Nur hab ich ab und an das Gefühl, dass das Zitatdingsi hier im Forum mich verarscht...

naja
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard