|
2 registered members (TipmyPip, USER0328),
6,640
guests, and 2
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
crash in ... pixel_for_bmap(drwbmp,x,y);
#13068
07/11/03 04:58
07/11/03 04:58
|
Joined: Oct 2002
Posts: 8,939 planet.earth
ello
OP
Senior Expert
|
OP
Senior Expert
Joined: Oct 2002
Posts: 8,939
planet.earth
|
i dont get it! here is the script: code:
action drawmap { var format; var pixel; var x; var y; var counterr;var counterg;var counterb; var drwbmp;
counterr=.001; counterg=.002; counterb=.003; drwbmp=bmap_for_entity(my,0); var xf;xf=1; var yf;yf=1; x=0;
format = bmap_lock(drwbmp,0); camera.bmap=drwbmp; while(x<256) { y=0; while(y<256) { pixel=pixel_for_bmap(drwbmp,x,y); pixel_to_vec(temp,100,format,pixel); temp.red= x*xf*temp.blue+counterr; temp.green= y*yf-temp.blue+counterg; temp.blue= x*xf-y*yf+counterb; pixel = pixel_for_vec(temp,10,format); pixel_to_bmap(drwbmp,x,y,pixel); counterr+=sin(temp.blue)/100; counterg+=cos(temp.red)/100; counterb+=sin(temp.green)/100; y+=2; bmap_unlock(drwbmp); } x+=2; }
}
does anybody now how to get this working?? this happens only if i try to access the bmap of an entity. panelbmaps work fine(slightly different code)
thanks in advance, ello
www.earthcontrol.dequoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
|
|
|
Re: crash in ... pixel_for_bmap(drwbmp,x,y);
#13070
07/12/03 07:16
07/12/03 07:16
|
Joined: Apr 2002
Posts: 1,511 Schweiz(Bern)
_burnner_
Senior Developer
|
Senior Developer
Joined: Apr 2002
Posts: 1,511
Schweiz(Bern)
|
quote: Originally posted by ello: i dont get it! here is the script:
code:
action drawmap { var format; var pixel; var x; var y; var counterr;var counterg;var counterb; var drwbmp;
counterr=.001; counterg=.002; counterb=.003; drwbmp=bmap_for_entity(my,0); var xf;xf=1; var yf;yf=1; x=0;
format = bmap_lock(drwbmp,0); camera.bmap=drwbmp; while(x<256) { y=0; while(y<256) { pixel=pixel_for_bmap(drwbmp,x,y); pixel_to_vec(temp,100,format,pixel); temp.red= x*xf*temp.blue+counterr; temp.green= y*yf-temp.blue+counterg; temp.blue= x*xf-y*yf+counterb; pixel = pixel_for_vec(temp,10,format); pixel_to_bmap(drwbmp,x,y,pixel); counterr+=sin(temp.blue)/100; counterg+=cos(temp.red)/100; counterb+=sin(temp.green)/100; y+=2; bmap_unlock(drwbmp); } x+=2; }
}
does anybody now how to get this working?? this happens only if i try to access the bmap of an entity. panelbmaps work fine(slightly different code)
thanks in advance, ello
not:
var drwbmp;
sondern bmap* drwbmp;
burnner
|
|
|
Re: crash in ... pixel_for_bmap(drwbmp,x,y);
#13071
07/12/03 07:25
07/12/03 07:25
|
Joined: Oct 2002
Posts: 8,939 planet.earth
ello
OP
Senior Expert
|
OP
Senior Expert
Joined: Oct 2002
Posts: 8,939
planet.earth
|
i tried this befor. and got the same error! i placed it outside the action - was this right? quote: not:
... sondern ...
is auch nicht schlecht
www.earthcontrol.dequoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
|
|
|
Re: crash in ... pixel_for_bmap(drwbmp,x,y);
#13072
07/12/03 07:34
07/12/03 07:34
|
Joined: Apr 2002
Posts: 1,511 Schweiz(Bern)
_burnner_
Senior Developer
|
Senior Developer
Joined: Apr 2002
Posts: 1,511
Schweiz(Bern)
|
Naja. ich versteh zwar nicht was du meinst, aber du kannst keine Bilder in ner Var Variabel speichern.. Ersetzt alle Var Variabeln wo ein Bild reinsoll durch bmap* variabel_name; wobei du natürlich variabel_name ersetzen musst mfg burnner
|
|
|
Re: crash in ... pixel_for_bmap(drwbmp,x,y);
#13074
07/12/03 01:02
07/12/03 01:02
|
Joined: Apr 2002
Posts: 1,511 Schweiz(Bern)
_burnner_
Senior Developer
|
Senior Developer
Joined: Apr 2002
Posts: 1,511
Schweiz(Bern)
|
quote: Originally posted by ello: ich hatte vorher mit bmap* drwbmp; gearbeitet, die variable hatte ich da dann nicht gesetzt. aber ich bekam die gleiche fehlermeldung.
Was für ne Fehlermeldung kam?
|
|
|
Re: crash in ... pixel_for_bmap(drwbmp,x,y);
#13077
07/12/03 02:15
07/12/03 02:15
|
Joined: Oct 2002
Posts: 8,939 planet.earth
ello
OP
Senior Expert
|
OP
Senior Expert
Joined: Oct 2002
Posts: 8,939
planet.earth
|
an welcher stelle müsste ich den code einfügen. ich denke das ich pixel_for_bmap verwenden muss, um die bmap zu beschreiben. ich hab die fehlermeldung nochmal genauer : Error E1513: WDL crash in... Ausführung fehlerhaften Skript-Codes in einer bestimmten Funktion, z.B. Teilung durch 0 oder Ziehen der Quadratwurzel einer negativen Zahl. Beachten Sie, dass solche Fehler nur in der Entwicklungs-Engine abgefangen und angezeigt werden. In der Vertriebsversion werden sie schlicht und einfach das Programm zum Absturz bringen. ich versteh aber nicht warum. wie schon gesagt, ich habe keine probleme, wenn ich mit bmap drwbmp=<...>; arbeite und dann in der action die zeile mit bmap for entity weglasse. so kann ich auf eine bmap zeichnen(panel) ich möchte aber auf eine textur eines models zeichnen, was ja auch geht den bei meinen ultimate camera fx habe ich einen view auf die textur gerendert. jetzt möchte ich aber die pixel einzeln verändern.
www.earthcontrol.dequoted: We want to maintain a clean, decent, American family suited forum look... which means you may post zombies or chainsaw massacres, but no erotic.
|
|
|
|