Blitz "decl" wrapper

Previous topic - Next topic

Kitty Hello

ich scmeiß' mich weg! WAYNE!

Schranz0r

Quote from: trucidare on 2008-Sep-18
ich kann mir vorstellen das es Wayne auch mal nicht interessiert. Warum müsst ihr Wayne immer mit sonem müll belagern ;)

ähhhh ... :
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

Heiko

Ick mein das so.....   
Code (glbasic) Select
block = Xo_LoadMesh("block.b3d") das geht, aber
Code (glbasic) Select
block = Xo_LoadMesh("media/block.b3d") geht net.

Dazugehörige Funktion:

Code (glbasic) Select
FUNCTION Xo_LoadMesh: path$, parent = 0
INLINE
    if(xLoadMesh)
    path_Str.Alloc(512);
      return xLoadMesh(path_Str.GetStrData(),parent); path_Str.CalcLen();
ENDINLINE
ENDFUNCTION



Kitty Hello

mach vorher ein:
Code (glbasic) Select

FUNCTION Xo_LoadMesh: path$, parent = 0
path$ = REPLACE$("/", "\\")
INLINE
    if(xLoadMesh)
    path_Str.Alloc(512);
      return xLoadMesh(path_Str.GetStrData(),parent); path_Str.CalcLen();
ENDINLINE
ENDFUNCTION

Heiko

#49
Code (glbasic) Select
path$ = REPLACE$("/", "\\")

müsste ja

Code (glbasic) Select
path$ = REPLACE$(path$, "/", "\\")

heißen...

aber kommt trotzdem so oder so ein SYNTAX ERROR beim Compilieren.....

Fehler liegt in "\\". Wenn ich die \\ als string nehme, erscheint die schliessende klammer immer noch "string"grau, und nicht weiß.
fazit
Code (glbasic) Select
\ in strings machen probleme...

p.s. hab jetzt die aktuelle 5ér drauf...

Lösung
Code (glbasic) Select
path$ = REPLACE$(path$, " / ", " \\ " )
Leerzeichen vor und dannach....

Schranz0r

oder einfach CHR$(dec) benutzen :)  :nana:  :good:  :whistle:


<3  :|
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

Kitty Hello

Jo. Schranzor hat recht.
oder mach's inline.

path_Str = REPLACE_Str(path_Str, CGStr("/"), CGStr("\\"));

Heiko

war net viel, habs schon alles ersetzt....