Yeah, png is better than tga. :p
Printable View
Yeah, png is better than tga. :p
grim when i start my game the 3 card's are already on the table i don't even have to press x. big prob.
Zitat:
Zitat von ZereoX
can u pm me your whole code? im confused.
here is my draw function: W and V are ranfom functions
here is my Hit and stand code:Code:function drawCard()
if W == 1 then screen:blit(55, 165, Aceclover)
elseif W == 2 then screen:blit(55, 165, Acediamond)
elseif W == 3 then screen:blit(55, 165, Aceheart)
elseif W == 4 then screen:blit(55, 165, Acespade)
elseif W == 5 then screen:blit(55, 165, Twoclover)
elseif W == 6 then screen:blit(55, 165, Twodiamond)
elseif W == 7 then screen:blit(55, 165, Twoheart)
elseif W == 8 then screen:blit(55, 165, Twospade)
elseif W == 9 then screen:blit(55, 165, Threeclover)
elseif W == 10 then screen:blit(55, 165, Threediamond)
elseif W == 11 then screen:blit(55, 165, Threeheart)
elseif W == 12 then screen:blit(55, 165, Threespade)
elseif W == 13 then screen:blit(55, 165, Fourclover)
elseif W == 14 then screen:blit(55, 165, Fourdiamond)
elseif W == 15 then screen:blit(55, 165, Fourheart)
elseif W == 16 then screen:blit(55, 165, Fourspade)
elseif W == 17 then screen:blit(55, 165, Fiveclover)
elseif W == 18 then screen:blit(55, 165, Fivediamond)
elseif W == 19 then screen:blit(55, 165, Fiveheart)
elseif W == 20 then screen:blit(55, 165, Fivespade)
elseif W == 21 then screen:blit(55, 165, Sixclover)
elseif W == 22 then screen:blit(55, 165, Sixdiamond)
elseif W == 23 then screen:blit(55, 165, Sixheart)
elseif W == 24 then screen:blit(55, 165, Sixspade)
elseif W == 25 then screen:blit(55, 165, Sevenclover)
elseif W == 26 then screen:blit(55, 165, Sevendiamond)
elseif W == 27 then screen:blit(55, 165, Sevenheart)
elseif W == 28 then screen:blit(55, 165, Sevenspade)
elseif W == 29 then screen:blit(55, 165, eightclover)
elseif W == 30 then screen:blit(55, 165, eightdiamond)
elseif W == 31 then screen:blit(55, 165, eightheart)
elseif W == 32 then screen:blit(55, 165, eightspade)
elseif W == 33 then screen:blit(55, 165, Nineclover)
elseif W == 34 then screen:blit(55, 165, Ninediamond)
elseif W == 35 then screen:blit(55, 165, Nineheart)
elseif W == 36 then screen:blit(55, 165, Ninespade)
elseif W == 37 then screen:blit(55, 165, Tenclover)
elseif W == 38 then screen:blit(55, 165, Tendiamond)
elseif W == 39 then screen:blit(55, 165, Tenheart)
elseif W == 40 then screen:blit(55, 165, Tenspade)
elseif W == 41 then screen:blit(55, 165, Jackclover)
elseif W == 42 then screen:blit(55, 165, Jackdiamond)
elseif W == 43 then screen:blit(55, 165, Jackheart)
elseif W == 44 then screen:blit(55, 165, Jackspade)
elseif W == 45 then screen:blit(55, 165, Queenclover)
elseif W == 46 then screen:blit(55, 165, Queendiamond)
elseif W == 47 then screen:blit(55, 165, Queenheart)
elseif W == 48 then screen:blit(55, 165, Queenspade)
elseif W == 49 then screen:blit(55, 165, Kingclover)
elseif W == 50 then screen:blit(55, 165, Kingdiamond)
elseif W == 51 then screen:blit(55, 165, Kingheart)
elseif W == 52 then screen:blit(55, 165, Kingspade)
end
end
function drawCardthree()
if V == 1 then screen:blit(70, 165, Aceclover)
elseif V == 2 then screen:blit(70, 165, Acediamond)
elseif V == 3 then screen:blit(70, 165, Aceheart)
elseif V == 4 then screen:blit(70, 165, Acespade)
elseif V == 5 then screen:blit(70, 165, Twoclover)
elseif V == 6 then screen:blit(70, 165, Twodiamond)
elseif V == 7 then screen:blit(70, 165, Twoheart)
elseif V == 8 then screen:blit(70, 165, Twospade)
elseif V == 9 then screen:blit(70, 165, Threeclover)
elseif V == 10 then screen:blit(70, 165, Threediamond)
elseif V == 11 then screen:blit(70, 165, Threeheart)
elseif V == 12 then screen:blit(70, 165, Threespade)
elseif V == 13 then screen:blit(70, 165, Fourclover)
elseif V == 14 then screen:blit(70, 165, Fourdiamond)
elseif V == 15 then screen:blit(70, 165, Fourheart)
elseif V == 16 then screen:blit(70, 165, Fourspade)
elseif V == 17 then screen:blit(70, 165, Fiveclover)
elseif V == 18 then screen:blit(70, 165, Fivediamond)
elseif V == 19 then screen:blit(70, 165, Fiveheart)
elseif V == 20 then screen:blit(70, 165, Fivespade)
elseif V == 21 then screen:blit(70, 165, Sixclover)
elseif V == 22 then screen:blit(70, 165, Sixdiamond)
elseif V == 23 then screen:blit(70, 165, Sixheart)
elseif V == 24 then screen:blit(70, 165, Sixspade)
elseif V == 25 then screen:blit(70, 165, Sevenclover)
elseif V == 26 then screen:blit(70, 165, Sevendiamond)
elseif V == 27 then screen:blit(70, 165, Sevenheart)
elseif V == 28 then screen:blit(70, 165, Sevenspade)
elseif V == 29 then screen:blit(70, 165, eightclover)
elseif V == 30 then screen:blit(70, 165, eightdiamond)
elseif V == 31 then screen:blit(70, 165, eightheart)
elseif V == 32 then screen:blit(70, 165, eightspade)
elseif V == 33 then screen:blit(70, 165, Nineclover)
elseif V == 34 then screen:blit(70, 165, Ninediamond)
elseif V == 35 then screen:blit(70, 165, Nineheart)
elseif V == 36 then screen:blit(70, 165, Ninespade)
elseif V == 37 then screen:blit(70, 165, Tenclover)
elseif V == 38 then screen:blit(70, 165, Tendiamond)
elseif V == 39 then screen:blit(70, 165, Tenheart)
elseif V == 40 then screen:blit(70, 165, Tenspade)
elseif V == 41 then screen:blit(70, 165, Jackclover)
elseif V == 42 then screen:blit(70, 165, Jackdiamond)
elseif V == 43 then screen:blit(70, 165, Jackheart)
elseif V == 44 then screen:blit(70, 165, Jackspade)
elseif V == 45 then screen:blit(70, 165, Queenclover)
elseif V == 46 then screen:blit(70, 165, Queendiamond)
elseif V == 47 then screen:blit(70, 165, Queenheart)
elseif V == 48 then screen:blit(70, 165, Queenspade)
elseif V == 49 then screen:blit(70, 165, Kingclover)
elseif V == 50 then screen:blit(70, 165, Kingdiamond)
elseif V == 51 then screen:blit(70, 165, Kingheart)
elseif V == 52 then screen:blit(70, 165, Kingspade)
end
end
Code:if pad:up() and oldpad:up() ~= pad:up() then
Command = Command-1
end
if pad:down() and oldpad:down() ~= pad:down() then
Command = Command+1
end
if Command > 3 then
Command = 0
end
if Command < 0 then
Command = 3
end
if Command == 0 then
screen:blit(350,175,Selector)
else
if Command == 1 then
screen:blit(360,195,Selector)
else
if Command == 2 then
screen:blit(343,215,Selector)
else
if Command == 3 then
screen:blit(350,235,Selector)
end
end
end
end
if pad:cross() and oldpad:cross() ~= pad:cross() and Command == 1 then
Select:play() Drawcard = 1
end
if Drawcard == 1 then
drawCard() Points = Points + Pointstwo
end
if pad:cross() and oldpad:cross() ~= pad:cross() and Command == 0 then
Select:play() Dealerdraw = 1
end
if Dealerdraw == 1 then
dealerDrawtwo()
Special = 1
end
if Special == 1 then
Dealerpoints = Dealerpoints+Dealerpointstwo
end
if Special == 1 then
pointsCalculate()
screen:print(0,0,"Press [] to Restart",white)
screen:print(0,10,"Press O to Return",white)
if pad:square() then
dofile("game.lua")
end
if pad:circle() then
dofile("script.lua")
end
end
if pad:cross() and oldpad:cross() ~= pad:cross() and Command == 2 then
Select:play() <-----Didn't do nothing yet
end
if pad:cross() and oldpad:cross() ~= pad:cross() and Command == 3 then
Select:play() <-----Didn't do nothing yet
end
Thanks :) Guess the loops will get quite big, but the PSP is fast enough for that :Jump:Zitat:
Zitat von Altair
ZereoX, if youre using notepad, then you can do this.
In notepad, while editing your script, press CTRL and F.
Then search for ALL your function's names.
Look for any stray functions you called outside of an 'if' statement.
If that doesnt work. Post all your code again, except put all your functions in bold. It makes looking for errors or hiccups easier. :icon_smil Heck, doing that, you might find the problem.
EDIT - Oh yea, and what does "Command" equal in the beginning when you start?
Does anyone know where I can find a tutorial on sidescrolling. I am going to create one for psp-programming, however I need something to reference.
It wouldn't really be your tut then would it? :S
IM not using the whole thing, just need some for reference, and dont worry I will give credit
Well there are not any that i know of.