Button Fenster zuweisen -> Type Problem
Übersicht

shootermakerBetreff: Button Fenster zuweisen -> Type Problem |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Hallo,
hab ein Problem mit Types. Code: [AUSKLAPPEN] Function create_window(name$,window_type,x_pos,y_pos,x_scale,y_scale,r,g,b) this_window.window = New window this_window.window\name = name this_window.window\x = x_pos this_window.window\y = y_pos this_window.window\width = x_scale this_window.window\height = y_scale this_window.window\order = -1 this_window.window\sprite = CreateMesh(camera) ... ... ... Return Handle(this_window.window) End Function Function create_button(name$,window%,x_pos,y_pos,x_scale,y_scale) this_button.button = New button this_button.button\name = name this_button.button\window = window this_button.button\x = x_pos this_button.button\y = y_pos this_button.button\width = x_scale this_button.button\height = y_scale this_button.button\sprite = CreateMesh(this_button.button\window) ... ... ... Return Handle(this_button.button) End Function window1 = create_window("Window",1,40,30,400,200,60,80,100) button1 = create_button("Wireframe",window1,150,135,10,10) er bringt aber die Fehlermeldung "Parent entity does not exist" Kann mir jemand helfen? Vielen dank im Voraus. |
||
da_poller |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
ist der type this_button.button global? | ||
shootermaker |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
hmm ne ist er nicht.
aber sind types nicht von haus aus immer global? Code: [AUSKLAPPEN] Type window Field name$ Field x Field y Field oldx Field oldy Field newx Field newy Field width Field height Field sprite Field selected Field order End Type Type Button Field name$ Field window% Field x Field y Field width Field height Field sprite End Type wenn ich das hinzufüge: "Global this_button.button" ändert sich auch nix. |
||
![]() |
The_Nici |
![]() Antworten mit Zitat ![]() |
---|---|---|
Types sind von haus aus immer Global.
Jedoch ist camera nicht global. MfG |
||
shootermaker |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
hi,
camera ist als global definiert. die Fehlermeldung bringt er bei der Zeile: "this_button.button\sprite = CreateMesh(this_button.button\window) " |
||
![]() |
The_Nici |
![]() Antworten mit Zitat ![]() |
---|---|---|
Mach "Return Handle(blabla)" weg, nimm "Return this_window.window"
MfG |
||
shootermaker |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Wenn ich das mache bringt er die Fehlermeldung "illegal type conversion" | ||
![]() |
The_Nici |
![]() Antworten mit Zitat ![]() |
---|---|---|
Hallo, versuche folgendes:
Code: [AUSKLAPPEN] Function create_window.window(...) und Code: [AUSKLAPPEN] mywindow.window = create_window.window(...) MfG[/i] |
||
shootermaker |
![]() Antworten mit Zitat ![]() |
|
---|---|---|
Danke, hat geklappt ![]() |
||
Übersicht


Powered by phpBB © 2001 - 2006, phpBB Group