The above video goes away if you are a member and logged in, so log in now!

 Would you like to get all the newest Gaming News fromQJ.NET in your email each day? Want to learn more about the team who brings you the QJ news?

This is a discussion on Lua Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; I have a problem i made this Code: Hearts = {} Hearts[1] = {A = 1,2 = 2,3 = 3,4 ...

 Tweet
1. I have a problem i made this
Code:
Hearts = {}
Hearts[1] = {A = 1,2 = 2,3 = 3,4 = 4,5 = 5,6 = 6,7 = 7,8 = 8,9 = 9,10 = 10,J = 10,Q = 10,K = 10}
Spade[1] = {A = 1,2 = 2,3 = 3,4 = 4,5 = 5,6 = 6,7 = 7,8 = 8,9 = 9,10 = 10,J = 10,Q = 10,K = 10}
Diamond = {}
Diamond[1] = {A = 1,2 = 2,3 = 3,4 = 4,5 = 5,6 = 6,7 = 7,8 = 8,9 = 9,10 = 10,J = 10,Q = 10,K = 10}
Clover = {}
Clover[1] = {A = 1,2 = 2,3 = 3,4 = 4,5 = 5,6 = 6,7 = 7,8 = 8,9 = 9,10 = 10,J = 10,Q = 10,K = 10}
and get this error:
error: script.lua:20 '}' expected near '='

What did i do wrong?

2. i think u dont need the spaces after all the spaces try this

Code:
Hearts = {}
Hearts[1] = {A =1,2 =2,3 =3,4 =4,5 =5,6 =6,7 =7,8 =8,9 =9,10 =10,J =10,Q =10,K =10}
but not sure, just a guees, and do the rest for all the other tables, ect...

3. Originally Posted by ZereoX
I have a problem i made this
Code:
Hearts = {}
Hearts[1] = {A = 1,2 = 2,3 = 3,4 = 4,5 = 5,6 = 6,7 = 7,8 = 8,9 = 9,10 = 10,J = 10,Q = 10,K = 10}
Spade[1] = {A = 1,2 = 2,3 = 3,4 = 4,5 = 5,6 = 6,7 = 7,8 = 8,9 = 9,10 = 10,J = 10,Q = 10,K = 10}
Diamond = {}
Diamond[1] = {A = 1,2 = 2,3 = 3,4 = 4,5 = 5,6 = 6,7 = 7,8 = 8,9 = 9,10 = 10,J = 10,Q = 10,K = 10}
Clover = {}
Clover[1] = {A = 1,2 = 2,3 = 3,4 = 4,5 = 5,6 = 6,7 = 7,8 = 8,9 = 9,10 = 10,J = 10,Q = 10,K = 10}
and get this error:
error: script.lua:20 '}' expected near '='

What did i do wrong?
which one is line 20?

4. Hearts[1] = {A = 1,2 = 2,3 = 3,4 = 4,5 = 5,6 = 6,7 = 7,8 = 8,9 = 9,10 = 10,J = 10,Q = 10,K = 10}

5. Its ok i found how but now i have a other prob
ok
X = math.random(1,52)
Points = 0
Code:
if X == 1 then screen:blit(40, 165, Aceclover) Points = Points+1
elseif X == 2 then screen:blit(40, 165, Acediamond) Points = Points+1
elseif X == 3 then screen:blit(40, 165, Aceheart) Points = Points+1
elseif X == 4 then screen:blit(40, 165, Acespade) Points = Points+1
elseif X == 5 then screen:blit(40, 165, Twoclover) Points = Points+2
elseif X == 6 then screen:blit(40, 165, Twodiamond) Points = Points+2
elseif X == 7 then screen:blit(40, 165, Twoheart) Points = Points+2
elseif X == 8 then screen:blit(40, 165, Twospade) Points = Points+2
elseif X == 9 then screen:blit(40, 165, Threeclover) Points = Points+3
elseif X == 10 then screen:blit(40, 165, Threediamond) Points = Points+3
elseif X == 11 then screen:blit(40, 165, Threeheart) Points = Points+3
elseif X == 12 then screen:blit(40, 165, Threespade) Points = Points+3
elseif X == 13 then screen:blit(40, 165, Fourclover) Points = Points+4
elseif X == 14 then screen:blit(40, 165, Fourdiamond) Points = Points+4
elseif X == 15 then screen:blit(40, 165, Fourheart) Points = Points+4
elseif X == 16 then screen:blit(40, 165, Fourspade) Points = Points+4
elseif X == 17 then screen:blit(40, 165, Fiveclover) Points = Points+5
elseif X == 18 then screen:blit(40, 165, Fivediamond) Points = Points+5
elseif X == 19 then screen:blit(40, 165, Fiveheart) Points = Points+5
elseif X == 20 then screen:blit(40, 165, Fivespade) Points = Points+5
elseif X == 21 then screen:blit(40, 165, Sixclover) Points = Points+6
elseif X == 22 then screen:blit(40, 165, Sixdiamond) Points = Points+6
elseif X == 23 then screen:blit(40, 165, Sixheart) Points = Points+6
elseif X == 24 then screen:blit(40, 165, Sixspade) Points = Points+6
elseif X == 25 then screen:blit(40, 165, Sevenclover) Points = Points+7
elseif X == 26 then screen:blit(40, 165, Sevendiamond) Points = Points+7
elseif X == 27 then screen:blit(40, 165, Sevenheart) Points = Points+7
elseif X == 28 then screen:blit(40, 165, Sevenspade) Points = Points+7
elseif X == 29 then screen:blit(40, 165, eightclover) Points = Points+8
elseif X == 30 then screen:blit(40, 165, eightdiamond) Points = Points+8
elseif X == 31 then screen:blit(40, 165, eightheart) Points = Points+8
elseif X == 32 then screen:blit(40, 165, eightspade) Points = Points+8
elseif X == 33 then screen:blit(40, 165, Nineclover) Points = Points+9
elseif X == 34 then screen:blit(40, 165, Ninediamond) Points = Points+9
elseif X == 35 then screen:blit(40, 165, Nineheart) Points = Points+9
elseif X == 36 then screen:blit(40, 165, Ninespade) Points = Points+9
elseif X == 37 then screen:blit(40, 165, Tenclover) Points = Points+10
elseif X == 38 then screen:blit(40, 165, Tendiamond) Points = Points+10
elseif X == 39 then screen:blit(40, 165, Tenheart) Points = Points+10
elseif X == 40 then screen:blit(40, 165, Tenspade) Points = Points+10
elseif X == 41 then screen:blit(40, 165, Jackclover) Points = Points+10
elseif X == 42 then screen:blit(40, 165, Jackdiamond) Points = Points+10
elseif X == 43 then screen:blit(40, 165, Jackheart) Points = Points+10
elseif X == 44 then screen:blit(40, 165, Jackspade) Points = Points+10
elseif X == 45 then screen:blit(40, 165, Queenclover) Points = Points+10
elseif X == 46 then screen:blit(40, 165, Queendiamond) Points = Points+10
elseif X == 47 then screen:blit(40, 165, Queenheart) Points = Points+10
elseif X == 48 then screen:blit(40, 165, Queenspade) Points = Points+10
elseif X == 49 then screen:blit(40, 165, Kingclover) Points = Points+10
elseif X == 50 then screen:blit(40, 165, Kingdiamond) Points = Points+10
elseif X == 51 then screen:blit(40, 165, Kingheart) Points = Points=10
elseif X == 52 then screen:blit(40, 165, Kingspade) Points = Points=10
end

but when i get EX: KingSpade and i write:
screenrint(25, 180, Points,white)
then it show's 10 but it start's to go up
10,20,30,40 and doesnt stop how can i make so that it only show's 10 or 9 etc depending on what card i got.

6. Its ok i found how but now i have a other prob
ok
Code:
X = math.random(1,52)
Points = 0
Code:
if X == 1 then screen:blit(40, 165, Aceclover) Points = Points+1
elseif X == 2 then screen:blit(40, 165, Acediamond) Points = Points+1
elseif X == 3 then screen:blit(40, 165, Aceheart) Points = Points+1
elseif X == 4 then screen:blit(40, 165, Acespade) Points = Points+1
elseif X == 5 then screen:blit(40, 165, Twoclover) Points = Points+2
elseif X == 6 then screen:blit(40, 165, Twodiamond) Points = Points+2
elseif X == 7 then screen:blit(40, 165, Twoheart) Points = Points+2
elseif X == 8 then screen:blit(40, 165, Twospade) Points = Points+2
elseif X == 9 then screen:blit(40, 165, Threeclover) Points = Points+3
elseif X == 10 then screen:blit(40, 165, Threediamond) Points = Points+3
elseif X == 11 then screen:blit(40, 165, Threeheart) Points = Points+3
elseif X == 12 then screen:blit(40, 165, Threespade) Points = Points+3
elseif X == 13 then screen:blit(40, 165, Fourclover) Points = Points+4
elseif X == 14 then screen:blit(40, 165, Fourdiamond) Points = Points+4
elseif X == 15 then screen:blit(40, 165, Fourheart) Points = Points+4
elseif X == 16 then screen:blit(40, 165, Fourspade) Points = Points+4
elseif X == 17 then screen:blit(40, 165, Fiveclover) Points = Points+5
elseif X == 18 then screen:blit(40, 165, Fivediamond) Points = Points+5
elseif X == 19 then screen:blit(40, 165, Fiveheart) Points = Points+5
elseif X == 20 then screen:blit(40, 165, Fivespade) Points = Points+5
elseif X == 21 then screen:blit(40, 165, Sixclover) Points = Points+6
elseif X == 22 then screen:blit(40, 165, Sixdiamond) Points = Points+6
elseif X == 23 then screen:blit(40, 165, Sixheart) Points = Points+6
elseif X == 24 then screen:blit(40, 165, Sixspade) Points = Points+6
elseif X == 25 then screen:blit(40, 165, Sevenclover) Points = Points+7
elseif X == 26 then screen:blit(40, 165, Sevendiamond) Points = Points+7
elseif X == 27 then screen:blit(40, 165, Sevenheart) Points = Points+7
elseif X == 28 then screen:blit(40, 165, Sevenspade) Points = Points+7
elseif X == 29 then screen:blit(40, 165, eightclover) Points = Points+8
elseif X == 30 then screen:blit(40, 165, eightdiamond) Points = Points+8
elseif X == 31 then screen:blit(40, 165, eightheart) Points = Points+8
elseif X == 32 then screen:blit(40, 165, eightspade) Points = Points+8
elseif X == 33 then screen:blit(40, 165, Nineclover) Points = Points+9
elseif X == 34 then screen:blit(40, 165, Ninediamond) Points = Points+9
elseif X == 35 then screen:blit(40, 165, Nineheart) Points = Points+9
elseif X == 36 then screen:blit(40, 165, Ninespade) Points = Points+9
elseif X == 37 then screen:blit(40, 165, Tenclover) Points = Points+10
elseif X == 38 then screen:blit(40, 165, Tendiamond) Points = Points+10
elseif X == 39 then screen:blit(40, 165, Tenheart) Points = Points+10
elseif X == 40 then screen:blit(40, 165, Tenspade) Points = Points+10
elseif X == 41 then screen:blit(40, 165, Jackclover) Points = Points+10
elseif X == 42 then screen:blit(40, 165, Jackdiamond) Points = Points+10
elseif X == 43 then screen:blit(40, 165, Jackheart) Points = Points+10
elseif X == 44 then screen:blit(40, 165, Jackspade) Points = Points+10
elseif X == 45 then screen:blit(40, 165, Queenclover) Points = Points+10
elseif X == 46 then screen:blit(40, 165, Queendiamond) Points = Points+10
elseif X == 47 then screen:blit(40, 165, Queenheart) Points = Points+10
elseif X == 48 then screen:blit(40, 165, Queenspade) Points = Points+10
elseif X == 49 then screen:blit(40, 165, Kingclover) Points = Points+10
elseif X == 50 then screen:blit(40, 165, Kingdiamond) Points = Points+10
elseif X == 51 then screen:blit(40, 165, Kingheart) Points = Points=10
elseif X == 52 then screen:blit(40, 165, Kingspade) Points = Points=10
end
but when i get EX: KingSpade and i write:
screenrint(25, 180, Points,white)
then it show's 10 but it start's to go up
10,20,30,40 and doesnt stop how can i make so that it only show's 10,9,8,7,6,5,4,3,2 ot 1 depending on what card i got.

7. Originally Posted by ZereoX
Its ok i found how but now i have a other prob
ok
Code:
X = math.random(1,52)
Points = 0
Code:
if X == 1 then screen:blit(40, 165, Aceclover) Points = Points+1
elseif X == 2 then screen:blit(40, 165, Acediamond) Points = Points+1
elseif X == 3 then screen:blit(40, 165, Aceheart) Points = Points+1
elseif X == 4 then screen:blit(40, 165, Acespade) Points = Points+1
elseif X == 5 then screen:blit(40, 165, Twoclover) Points = Points+2
elseif X == 6 then screen:blit(40, 165, Twodiamond) Points = Points+2
elseif X == 7 then screen:blit(40, 165, Twoheart) Points = Points+2
elseif X == 8 then screen:blit(40, 165, Twospade) Points = Points+2
elseif X == 9 then screen:blit(40, 165, Threeclover) Points = Points+3
elseif X == 10 then screen:blit(40, 165, Threediamond) Points = Points+3
elseif X == 11 then screen:blit(40, 165, Threeheart) Points = Points+3
elseif X == 12 then screen:blit(40, 165, Threespade) Points = Points+3
elseif X == 13 then screen:blit(40, 165, Fourclover) Points = Points+4
elseif X == 14 then screen:blit(40, 165, Fourdiamond) Points = Points+4
elseif X == 15 then screen:blit(40, 165, Fourheart) Points = Points+4
elseif X == 16 then screen:blit(40, 165, Fourspade) Points = Points+4
elseif X == 17 then screen:blit(40, 165, Fiveclover) Points = Points+5
elseif X == 18 then screen:blit(40, 165, Fivediamond) Points = Points+5
elseif X == 19 then screen:blit(40, 165, Fiveheart) Points = Points+5
elseif X == 20 then screen:blit(40, 165, Fivespade) Points = Points+5
elseif X == 21 then screen:blit(40, 165, Sixclover) Points = Points+6
elseif X == 22 then screen:blit(40, 165, Sixdiamond) Points = Points+6
elseif X == 23 then screen:blit(40, 165, Sixheart) Points = Points+6
elseif X == 24 then screen:blit(40, 165, Sixspade) Points = Points+6
elseif X == 25 then screen:blit(40, 165, Sevenclover) Points = Points+7
elseif X == 26 then screen:blit(40, 165, Sevendiamond) Points = Points+7
elseif X == 27 then screen:blit(40, 165, Sevenheart) Points = Points+7
elseif X == 28 then screen:blit(40, 165, Sevenspade) Points = Points+7
elseif X == 29 then screen:blit(40, 165, eightclover) Points = Points+8
elseif X == 30 then screen:blit(40, 165, eightdiamond) Points = Points+8
elseif X == 31 then screen:blit(40, 165, eightheart) Points = Points+8
elseif X == 32 then screen:blit(40, 165, eightspade) Points = Points+8
elseif X == 33 then screen:blit(40, 165, Nineclover) Points = Points+9
elseif X == 34 then screen:blit(40, 165, Ninediamond) Points = Points+9
elseif X == 35 then screen:blit(40, 165, Nineheart) Points = Points+9
elseif X == 36 then screen:blit(40, 165, Ninespade) Points = Points+9
elseif X == 37 then screen:blit(40, 165, Tenclover) Points = Points+10
elseif X == 38 then screen:blit(40, 165, Tendiamond) Points = Points+10
elseif X == 39 then screen:blit(40, 165, Tenheart) Points = Points+10
elseif X == 40 then screen:blit(40, 165, Tenspade) Points = Points+10
elseif X == 41 then screen:blit(40, 165, Jackclover) Points = Points+10
elseif X == 42 then screen:blit(40, 165, Jackdiamond) Points = Points+10
elseif X == 43 then screen:blit(40, 165, Jackheart) Points = Points+10
elseif X == 44 then screen:blit(40, 165, Jackspade) Points = Points+10
elseif X == 45 then screen:blit(40, 165, Queenclover) Points = Points+10
elseif X == 46 then screen:blit(40, 165, Queendiamond) Points = Points+10
elseif X == 47 then screen:blit(40, 165, Queenheart) Points = Points+10
elseif X == 48 then screen:blit(40, 165, Queenspade) Points = Points+10
elseif X == 49 then screen:blit(40, 165, Kingclover) Points = Points+10
elseif X == 50 then screen:blit(40, 165, Kingdiamond) Points = Points+10
elseif X == 51 then screen:blit(40, 165, Kingheart) Points = Points=10
elseif X == 52 then screen:blit(40, 165, Kingspade) Points = Points=10
end
but when i get EX: KingSpade and i write:
screenrint(25, 180, Points,white)
then it show's 10 but it start's to go up
10,20,30,40 and doesnt stop how can i make so that it only show's 10,9,8,7,6,5,4,3,2 ot 1 depending on what card i got.
make the '=' signs on the last two lines '+' signs.
then see what happens.

8. Originally Posted by HaxxBlaster
I assumed that where able to do that by yourself.
Try it out, it should work. :)
Thanks works like a charm. But if i add too many frames will it mess it up? Because I made it 30 frames but I have to hold triangle to make the frames play where with 5 i only needed to press it

9. Still does't work when i do
screenrint(25,175,Points,white)
it goes up.

10. Originally Posted by ZereoX
Still does't work when i do
screenrint(25,175,Points,white)
it goes up.
try putting the
Code:
mathX = math.random(1,52)
in an 'if' statement.

Code:
mathX = math.random(1,52)
end
if all that is in a 'while true do' loop, its probrably cause the equation keeps running, therefore, the numbers rack up.

11. i got it i just did EX:

if X == 1 then screen:blit(40, 165, Aceclover) Points = 1 <-------- Points = 1 not Points = Points+1

12. Originally Posted by ZereoX
i got it i just did EX:

if X == 1 then screen:blit(40, 165, Aceclover) Points = 1 <-------- Points = 1 not Points = Points+1
you mean you didnt want it to add points? i thought you didnt want it to add points uncontrollably. oh well, at least you're learning by yourself! (i see talent) :)

13. I have one more question is this OK i just can't make a function whit it.it always say
error:script.lua:19 attempt to call global ' Drawcard' <a nil value>
X = math.random(1,52)
Here is my code and line 19 is the first.
Code:
Function Drawcard()
if X == 1 then screen:blit(55, 165, Aceclover)
elseif X == 2 then screen:blit(55, 165, Acediamond)
elseif X == 3 then screen:blit(55, 165, Aceheart)
elseif X == 4 then screen:blit(55, 165, Acespade)
elseif X == 5 then screen:blit(55, 165, Twoclover)
elseif X == 6 then screen:blit(55, 165, Twodiamond)
elseif X == 7 then screen:blit(55, 165, Twoheart)
elseif X == 8 then screen:blit(55, 165, Twospade)
elseif X == 9 then screen:blit(55, 165, Threeclover)
elseif X == 10 then screen:blit(55, 165, Threediamond)
elseif X == 11 then screen:blit(55, 165, Threeheart)
elseif X == 12 then screen:blit(55, 165, Threespade)
elseif X == 13 then screen:blit(55, 165, Fourclover)
elseif X == 14 then screen:blit(55, 165, Fourdiamond)
elseif X == 15 then screen:blit(55, 165, Fourheart)
elseif X == 16 then screen:blit(55, 165, Fourspade)
elseif X == 17 then screen:blit(55, 165, Fiveclover)
elseif X == 18 then screen:blit(55, 165, Fivediamond)
elseif X == 19 then screen:blit(55, 165, Fiveheart)
elseif X == 20 then screen:blit(55, 165, Fivespade)
elseif X == 21 then screen:blit(55, 165, Sixclover)
elseif X == 22 then screen:blit(55, 165, Sixdiamond)
elseif X == 23 then screen:blit(55, 165, Sixheart)
elseif X == 24 then screen:blit(55, 165, Sixspade)
elseif X == 25 then screen:blit(55, 165, Sevenclover)
elseif X == 26 then screen:blit(55, 165, Sevendiamond)
elseif X == 27 then screen:blit(55, 165, Sevenheart)
elseif X == 28 then screen:blit(55, 165, Sevenspade)
elseif X == 29 then screen:blit(55, 165, eightclover)
elseif X == 30 then screen:blit(55, 165, eightdiamond)
elseif X == 31 then screen:blit(55, 165, eightheart)
elseif X == 32 then screen:blit(55, 165, eightspade)
elseif X == 33 then screen:blit(55, 165, Nineclover)
elseif X == 34 then screen:blit(55, 165, Ninediamond)
elseif X == 35 then screen:blit(55, 165, Nineheart)
elseif X == 36 then screen:blit(55, 165, Ninespade)
elseif X == 37 then screen:blit(55, 165, Tenclover)
elseif X == 38 then screen:blit(55, 165, Tendiamond)
elseif X == 39 then screen:blit(55, 165, Tenheart)
elseif X == 40 then screen:blit(55, 165, Tenspade)
elseif X == 41 then screen:blit(55, 165, Jackclover)
elseif X == 42 then screen:blit(55, 165, Jackdiamond)
elseif X == 43 then screen:blit(55, 165, Jackheart)
elseif X == 44 then screen:blit(55, 165, Jackspade)
elseif X == 45 then screen:blit(55, 165, Queenclover)
elseif X == 46 then screen:blit(55, 165, Queendiamond)
elseif X == 47 then screen:blit(55, 165, Queenheart)
elseif X == 48 then screen:blit(55, 165, Queenspade)
elseif X == 49 then screen:blit(55, 165, Kingclover)
elseif X == 50 then screen:blit(55, 165, Kingdiamond)
elseif X == 51 then screen:blit(55, 165, Kingheart)
elseif X == 52 then screen:blit(55, 165, Kingspade)
end
If i get his function working Tomorow will be a First Release

14. Code:
function drawCard()
if X == 1 then screen:blit(55, 165, Aceclover)
elseif X == 2 then screen:blit(55, 165, Acediamond)
elseif X == 3 then screen:blit(55, 165, Aceheart)
elseif X == 4 then screen:blit(55, 165, Acespade)
elseif X == 5 then screen:blit(55, 165, Twoclover)
elseif X == 6 then screen:blit(55, 165, Twodiamond)
elseif X == 7 then screen:blit(55, 165, Twoheart)
elseif X == 8 then screen:blit(55, 165, Twospade)
elseif X == 9 then screen:blit(55, 165, Threeclover)
elseif X == 10 then screen:blit(55, 165, Threediamond)
elseif X == 11 then screen:blit(55, 165, Threeheart)
elseif X == 12 then screen:blit(55, 165, Threespade)
elseif X == 13 then screen:blit(55, 165, Fourclover)
elseif X == 14 then screen:blit(55, 165, Fourdiamond)
elseif X == 15 then screen:blit(55, 165, Fourheart)
elseif X == 16 then screen:blit(55, 165, Fourspade)
elseif X == 17 then screen:blit(55, 165, Fiveclover)
elseif X == 18 then screen:blit(55, 165, Fivediamond)
elseif X == 19 then screen:blit(55, 165, Fiveheart)
elseif X == 20 then screen:blit(55, 165, Fivespade)
elseif X == 21 then screen:blit(55, 165, Sixclover)
elseif X == 22 then screen:blit(55, 165, Sixdiamond)
elseif X == 23 then screen:blit(55, 165, Sixheart)
elseif X == 24 then screen:blit(55, 165, Sixspade)
elseif X == 25 then screen:blit(55, 165, Sevenclover)
elseif X == 26 then screen:blit(55, 165, Sevendiamond)
elseif X == 27 then screen:blit(55, 165, Sevenheart)
elseif X == 28 then screen:blit(55, 165, Sevenspade)
elseif X == 29 then screen:blit(55, 165, eightclover)
elseif X == 30 then screen:blit(55, 165, eightdiamond)
elseif X == 31 then screen:blit(55, 165, eightheart)
elseif X == 32 then screen:blit(55, 165, eightspade)
elseif X == 33 then screen:blit(55, 165, Nineclover)
elseif X == 34 then screen:blit(55, 165, Ninediamond)
elseif X == 35 then screen:blit(55, 165, Nineheart)
elseif X == 36 then screen:blit(55, 165, Ninespade)
elseif X == 37 then screen:blit(55, 165, Tenclover)
elseif X == 38 then screen:blit(55, 165, Tendiamond)
elseif X == 39 then screen:blit(55, 165, Tenheart)
elseif X == 40 then screen:blit(55, 165, Tenspade)
elseif X == 41 then screen:blit(55, 165, Jackclover)
elseif X == 42 then screen:blit(55, 165, Jackdiamond)
elseif X == 43 then screen:blit(55, 165, Jackheart)
elseif X == 44 then screen:blit(55, 165, Jackspade)
elseif X == 45 then screen:blit(55, 165, Queenclover)
elseif X == 46 then screen:blit(55, 165, Queendiamond)
elseif X == 47 then screen:blit(55, 165, Queenheart)
elseif X == 48 then screen:blit(55, 165, Queenspade)
elseif X == 49 then screen:blit(55, 165, Kingclover)
elseif X == 50 then screen:blit(55, 165, Kingdiamond)
elseif X == 51 then screen:blit(55, 165, Kingheart)
elseif X == 52 then screen:blit(55, 165, Kingspade)
end
try that.

15. that whast the problem i just needed to and

end
end

to it.

but now my prob is
if pad:cross() and Command == 1 then
Selectlay() drawCard() screen.waitVblankStart()
end

but the pic of the card won't stay.

16. can anybody help me ?
is there a way to take the decimals out of the coordinates when you use in the psp ?
Code:
screen:print(87,247,""..letterPosx,colorrr)
screen:print(87,256,""..letterPosy,colorrr)

17. Originally Posted by natan333
can anybody help me ?
is there a way to take the decimals out of the coordinates when you use in the psp ?
What do you mean?

Code:
screen:print(87,247, "" .. letterPosx, colorrr)
screen:print(87,256, "" .. letterPosy, colorrr)
This would work on the PSP, you had no spaces where the ".." are.

18. Originally Posted by ZereoX
that whast the problem i just needed to and

end
end

to it.

but now my prob is
if pad:cross() and Command == 1 then
Selectlay() drawCard() screen.waitVblankStart()
end

but the pic of the card won't stay.
wont stay..? how do you mean "wont stay"?

19. Originally Posted by HaxxBlaster
What do you mean?

Code:
screen:print(87,247, "" .. letterPosx, colorrr)
screen:print(87,256, "" .. letterPosy, colorrr)
This would work on the PSP, you had no spaces where the ".." are.
if you have nothing in the parantheses, then you dont need them or the dots.

Code:
screen:print(87,247, letterPosx, colorrr)
screen:print(87,256, letterPosy, colorrr)
that what you're looking for?

20. Of course you're right, but he maybe wanted some text to be there.

21. Originally Posted by HaxxBlaster
Of course you're right, but he maybe wanted some text to be there.
maybe, but i'm just saying, thats a way to do what he wants without the dots. (from what he's shown us)

22. EminentJonFrost, what i mean about won't stay is that i have to press x to make it appears but i have to hold it down to make it appear and when i let it go it goes off to

if you don't understand give email i will send it to you or MSN Messenger.

23. Originally Posted by ZereoX
EminentJonFrost, what i mean about won't stay is that i have to press x to make it appears but i have to hold it down to make it appear and when i let it go it goes off to

if you don't understand give email i will send it to you or MSN Messenger.
no i understand.
i'm having a similar problem myself.
i found a way to do it, but it may make things a little confusing for later. (if you do it, you'll understand...later :icon_razz )

um, ok, where you make the sprite appear. instead, make a variable change its value. and then put 'if variable = something then screen:blit(0, 0, pic)

24. Tkz now i maybe have a release Tonight or Tomorow morning.

IF I DON'T Pass by a other PROB.

BIG TKZ TO EmientJonFrost TKZ,TKZ

25. Originally Posted by HaxxBlaster
What do you mean?

Code:
screen:print(87,247, "" .. letterPosx, colorrr)
screen:print(87,256, "" .. letterPosy, colorrr)
This would work on the PSP, you had no spaces where the ".." are.
i mean that with the code to show the coordinates. it says like 182.97 in the psp and in the pc it says only 182 with out .97.
Is there a way to rip out the .97 so it show the same as in the pc ?

26. Originally Posted by natan333
i mean that with the code to show the coordinates. it says like 182.97 in the psp and in the pc it says only 182 with out .97.
Is there a way to rip out the .97 so it stays the same as in the pc ?
not that i know of..sorry.

27. Hey .. Im having problems with random funtions..

The problem is that i get a random number at the beggining of the program.. but then it stays like that the whole game.. I need it so when

Code:
if crossbx == 0 then
-- somehow do math.random() here to change crossby
end

28. can you reformulate your phrase plz i don't quite understand what you mean.

29. Originally Posted by ZereoX
can you reformulate your phrase plz i don't quite understand what you mean.
who me?

30. Originally Posted by montrob
Hey .. Im having problems with random funtions..

The problem is that i get a random number at the beggining of the program.. but then it stays like that the whole game.. I need it so when

Code:
if crossbx == 0 then
-- somehow do math.random() here to change crossby
end
put this:

Code:
math.randomseed(os.time())
at the VERY top of your code. itll work.

Page 69 of 342 First ... 19 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 119 169 ... Last

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

All times are GMT -8. The time now is 05:00 AM.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY