Win XP Pro ongelma! MAV kaverilla vaikka mulla ei.
Posted: Wed Jan 21, 2009 9:30 pm
Kaverillani on Win XP Pro eikä Cool Basic toimi... MAV tulee vaikka mulla ei tule. Mistäköhän sekin johtuu... Microsoft tietysti möhliny Tosin toimii...
Tässä koodi joka EI toimi:
Code: Select all
Repeat
AddText "Hello"
DrawScreen
Forever
Tässä koodi joka EI toimi:
Code: Select all
SCREEN 800,600
While 1
n=HPBar(10,10,100,n,100)
o=ManaBar(10,20,100,o,100)
e=ExpBar(10,30,100,e,100)
ä=(RightKey()-LeftKey())
n=n+(ä)
o=o+(ä)
e=e+(ä)
DrawScreen
Wend
// x,y = koordinaatit
// w = leveys
// s = nykyinen arvo
// m = maksimi arvo
Function HPBar(x#,y#,w#,s#,m#)
If s > m Then s = m
n# = (w/100*s/m)*100
For a = -1 To 3
Color 160-(Abs(a)*19),160-(Abs(a)*19),160-(Abs(a)*19)
Line x-(a>-1 And a<3),y+a,x+w+(a>-1 And a<3),y+a
Next a
If s > 0 Then
For i = -1 To 3
Color 250-(Abs(i)*6),60-(Abs(i)*6),60-(Abs(i)*19)
Line x-(i>-1 And i<3),y+i,x+n+(i>-1 And i<3),y+i
Next i
EndIf
Return Int(s/m*100)
EndFunction
Function ManaBar(x#,y#,w#,s#,m#)
If s > m Then s = m
o# = (w/100*s/m)*100
For a = -1 To 3
Color 160-(Abs(a)*19),160-(Abs(a)*19),160-(Abs(a)*19)
Line X-(A>-1 And a<3),y+a,x+w+(a>-1 And a<3),y+a
Next a
If s > 0 Then
For i = -1 To 3
Color 60-(Abs(i)*6),60-(Abs(i)*6),250-(Abs(i)*19)
Line x-(i>-1 And i<3),y+i,x+o+(i>-1 And i<3),y+i
Next i
EndIf
Return Int(s/m*100)
EndFunction
Function ExpBar(x#,y#,w#,s#,m#)
If s > m Then s = m
e# = (w/100*s/m)*100
For a = -1 To 3
Color 160-(Abs(a)*19),160-(Abs(a)*19),160-(Abs(a)*19)
Line x-(a>-1 And a<3),y+a,x+w+(a>-1 And a<3),y+a
Next a
If s > 0 Then
For i = -1 To 3
Color 100-(Abs(i)*6),60-(Abs(i)*6),250-(Abs(i)*19)
Line x-(i>-1 And i<3),y+i,x+e+(i>-1 And i<3),y+i
Next i
EndIf
Return Int(s/m*100)
EndFunction
EDIT:
Mulla on Win XP Home Edition.