GLBasic forum

Main forum => Bug Reports => Topic started by: uPd4t3d Data on 2008-Sep-13

Title: READSTR 1,var
Post by: uPd4t3d Data on 2008-Sep-13
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
Title: Re: READSTR 1,var
Post by: D2O on 2008-Sep-13
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
Title: Re: READSTR 1,var
Post by: Schranz0r on 2008-Sep-13
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'
Title: Re: READSTR 1,var
Post by: D2O on 2008-Sep-14
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.
Title: Re: READSTR 1,var
Post by: Schranz0r on 2008-Sep-14
genau das hab ich damit gesagt!
Nur hab ich ab und an das Gefühl, dass das Zitatdingsi hier im Forum mich verarscht...

naja