Load-Function Problem
Übersicht

![]() |
BlacksideBetreff: Load-Function Problem |
![]() Antworten mit Zitat ![]() |
---|---|---|
Hallo,
Ich habe ein blödes und komisches Problem... Ich progge grad einen 3D-Mapeditor für mein Spiel, bei der Load Function tritt das Problem auf und zwar: Code: [AUSKLAPPEN] DebugLog bl\texturepfad$ bl\texture = LoadBrush("textures\"+bl\texturepfad$) DebugLog bl\texture PaintEntity bl\model,bl\texture ;<- Hier meldet der Debugger das Problem: Brush doesnt exist Der erste DebugLog gibt: "brick.bmp" aus und diese Textur existiert im textures Ordner! aber der zweite DebugLog gibt 0 aus Oo D.h. er übersprint den Befehl einfach... EDIT: Hier ist die ganze Function und nen Mapfile.. Code: [AUSKLAPPEN] Function Load(pfad$) Clearmap() Local stream = ReadFile(pfad$) Local rle$ While Not Eof(stream) Local rl$ = ReadLine(stream) Select rl$ Case "$blocks={" Repeat rle$ = ReadString$(stream) If rle$ = "}" Then Exit bl.block = New block bl\texturepfad$ = rle$ bl\x = ReadByte(stream) bl\y = ReadByte(stream) bl\z = ReadByte(stream) bl\pitch = ReadByte(stream) bl\yaw = ReadByte(stream) bl\roll = ReadByte(stream) bl\scalex = ReadByte(stream) bl\scaley = ReadByte(stream) bl\scalez = ReadByte(stream) bl\id$ = "block"+curbid:curbid = curbid+1 bl\model = CreateCube() If bl\texturepfad$ <> "NONE" DebugLog bl\texturepfad$ bl\texture = LoadBrush("textures\"+bl\texturepfad$) DebugLog bl\texture PaintEntity bl\model,bl\texture EndIf EntityPickMode bl\model,2 NameEntity bl\model,bl\id$ PositionEntity bl\model,bl\x,bl\y,bl\z RotateEntity bl\model,bl\pitch,bl\yaw,bl\roll ResizeMesh(bl\model,bl\scalex,bl\scaley,bl\scalez) ReadLine(stream) durch = durch+1 Forever rle$ = "" durch = 0 ReadLine(stream) Case "$models={" Repeat rle$ = ReadString$(stream) If rle$ = "}" Then Exit m.models = New models m\texturepfad$ = rle$ m\modelpfad$ = ReadString$(stream) m\x = ReadByte(stream) m\y = ReadByte(stream) m\z = ReadByte(stream) m\pitch = ReadByte(stream) m\yaw = ReadByte(stream) m\roll = ReadByte(stream) m\scalex = ReadByte(stream) m\scaley = ReadByte(stream) m\scalez = ReadByte(stream) m\id = curid:curid = curid+1 m\model = LoadMesh("models\"+m\modelpfad$) If m\texturepfad$ <> "NONE" m\texture = LoadBrush("textures\"+m\texturepfad$) PaintEntity m\model,m\texture EndIf EntityPickMode m\model,2 NameEntity m\model,m\id PositionEntity m\model,m\x,m\y,m\z RotateEntity m\model,m\pitch,m\yaw,m\roll ResizeMesh(m\model,m\scalex,m\scaley,m\scalez) ReadLine(stream) durch = durch+1 Forever rle$ = "" ReadLine(stream) End Select Wend End Function ;map.umap: ;$blocks={ ; brick.bmp ; } ;$models={ ; brick.bmp ; ladder.3dsý ; } |
||
Tritium |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Meines Erachtens heißt das eher, dass er den Brush nicht laden konnte. Lass Dir mal mit CurrentDir() Deine aktuelle Verzeichnisposition ausgeben. Stell sicher, dass Du Dich in dem Ordner befindest, in dem sich der Ordner "textures" befindet. | ||
![]() |
Blackside |
![]() Antworten mit Zitat ![]() |
---|---|---|
Danke für die Antwort...du hattest Recht, durch den Filerequester hat er den Ordner gewechselt ![]() MFG Blackside |
||
Hier sollte eigentlich eine Signatur stehen! |
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group