Autor Beitrag
Blubba
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 16



BeitragVerfasst: Do 23.02.12 10:59 
Ich wollte ein Würfelspiel Programmieren, aber ich bekomme es nicht hin, dass das Random+1 gerechnet wird.
Da ja mit Random(6) Eine Zahl zwischen 0-5 rauskommt.

ausblenden Delphi-Quelltext
1:
2:
3:
Randomize;
  lWurfel1.Caption  := Random(6)+'1';
  lWurfel2.Caption  := Random(6)+'1';
bummi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 1248
Erhaltene Danke: 187

XP - Server 2008R2
D2 - Delphi XE
BeitragVerfasst: Do 23.02.12 11:08 
ausblenden Delphi-Quelltext
1:
lWurfel1.Caption  := IntToStr(Random(6) + 1);					


www.christian-stelzm...rtikel/crashkurs.htm

_________________
Das Problem liegt üblicherweise zwischen den Ohren H₂♂
DRY DRY KISS
Blubba Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 16



BeitragVerfasst: Do 23.02.12 11:12 
Danke