Page 1 of 7 12345 ... LastLast
Results 1 to 10 of 63

Thread: can somebody please tell me what I'm doing wrong with my lua script?

                  
   
  1. #1
    DCEmu Coder lmtlmt's Avatar
    Join Date
    Jan 2006
    Location
    Brisbane, Australia
    Posts
    1,755
    Rep Power
    89

    psp can somebody please tell me what I'm doing wrong with my lua script?

    can somebody please tell me what I'm doing wrong with my lua script?do the images work if they are jpeg? the menu works

    -- EVILMANA.COM PSP LUA CODEBASE
    -- www.evilmana.com/tutorials/codebase
    -- Menu
    -- SUBMITTED BY: KIWI
    red = Color.new(255, 0, 0)
    white = Color.new(255, 255, 255)

    --Variables
    Select = 1
    maxSelect = 2
    oldpad = Controls.read()
    --loop
    while true do
    pad = Controls.read()
    screen:clear()
    --checar decicion
    if pad:up() and oldpad:up() ~= pad:up() then
    Select = Select - 1
    end
    if pad:down() and oldpad:down() ~= pad:down() then
    Select = Select + 1
    end
    if Select > maxSelect then
    Select = 1
    elseif Select <= 0 then
    Select = maxSelect
    end
    if Select == 1 then
    screen:print(334,202,"2 PLAYER", red)
    screen:print(334,220,"EXIT",white)
    end
    if Select == 2 then
    screen:print(334,202,"2 PLAYER", white)
    screen:print(334,220,"EXIT",red)
    end
    if pad:cross() and Select == 1 then
    dofile("duel.lua")
    end
    if pad:cross() and Select == 2 then
    break
    end
    screen.waitVblankStart()
    screen.flip()
    oldpad = pad
    end
    but this part doesnt
    --IMAGES
    background = Image.load("YUGI BACKGROUND.png")
    title = Image.load("title.png")
    card1 = Image.load("SDY-001.jpeg")
    card2 = Image.load("SDY-002.jpeg")
    card3 = Image.load("SDY-003.jpeg")
    card4 = Image.load("SDY-004.jpeg")
    card5 = Image.load("SDY-005.jpeg")
    card6 = Image.load("SDY-006.jpeg")
    card7 = Image.load("SDY-007.jpeg")
    card8 = Image.load("SDY-008.jpeg")
    card9 = Image.load("SDY-009.jpeg")
    card10 = Image.load("SDY-010.jpeg")
    card11 = Image.load("SDY-011.jpeg")
    card12 = Image.load("SDY-012.jpeg")
    card13 = Image.load("SDY-013.jpeg")
    card14 = Image.load("SDY-014.jpeg")
    card15 = Image.load("SDY-015.jpeg")
    card16 = Image.load("SDY-016.jpeg")
    card17 = Image.load("SDY-017.jpeg")
    card18 = Image.load("SDY-018.jpeg")
    card19 = Image.load("SDY-019.jpeg")
    card20 = Image.load("SDY-020.jpeg")
    card21 = Image.load("SDY-021.jpeg")
    card22 = Image.load("SDY-022.jpeg")
    card23 = Image.load("SDY-023.jpeg")
    card24 = Image.load("SDY-024.jpeg")
    card25 = Image.load("SDY-025.jpeg")
    card26 = Image.load("SDY-026.jpeg")
    card27 = Image.load("SDY-027.jpeg")
    card28 = Image.load("SDY-028.jpeg")
    card29 = Image.load("SDY-029.jpeg")
    card30 = Image.load("SDY-030.jpeg")
    card31 = Image.load("SDY-031.jpeg")
    card32 = Image.load("SDY-032.jpeg")
    card33 = Image.load("SDY-033.jpeg")
    card34 = Image.load("SDY-034.jpeg")
    card35 = Image.load("SDY-035.jpeg")
    card36 = Image.load("SDY-036.jpeg")
    card37 = Image.load("SDY-037.jpeg")
    card38 = Image.load("SDY-038.jpeg")
    card39 = Image.load("SDY-039.jpeg")
    card40 = Image.load("SDY-040.jpeg")
    card41 = Image.load("SDY-041.jpeg")
    card42 = Image.load("SDY-042.jpeg")
    card43 = Image.load("SDY-043.jpeg")
    card44 = Image.load("SDY-044.jpeg")
    card45 = Image.load("SDY-045.jpeg")
    card46 = Image.load("SDY-046.jpeg")
    card47 = Image.load("SDY-047.jpeg")
    card48 = Image.load("SDY-048.jpeg")
    card49 = Image.load("SDY-049.jpeg")
    card50 = Image.load("SDY-050.jpeg")
    cardback = Image.load("about_fraud_back_auth.jpeg")

    -- COLOURS
    black = Color.new(0, 0, 0)
    white = Color.new(255, 255, 255)
    blue = Color.new(0, 128, 255)
    red = Color.new(255, 0, 0)
    green = Color.new(0, 255, 0)

    -- sounds
    introsnd = Sound.load(("Yugioh GX English theme.mp3")

    screen:blit(0, 0, title)

    while true do
    screen.waitVblankStart()
    end
    and here is the rar of all the images and the script and the script.cmd but i have removed the sound beacause it was 10 mb so just delete the line of code that says , i am trying to make a game but i have to make the title screen first, any help would be much appreciated.


    ps. this is just the beta: version1.0 will have 50 cards, and version 2.0 will have 100 cards, and that might be it, but if people like it i will continue to0 update it

  2. #2
    DCEmu Coder lmtlmt's Avatar
    Join Date
    Jan 2006
    Location
    Brisbane, Australia
    Posts
    1,755
    Rep Power
    89

    Default

    how would i set attack and defence points to each image/card, could i use variables and could it be used to determine how many life points to subtract.

  3. #3
    PS3 User Gizmo356's Avatar
    Join Date
    Feb 2006
    Age
    32
    Posts
    1,756
    Rep Power
    120

    Default

    Dont Do That If I Could Help I Would But Im Not Home Im Using My Cell Phone So I Cant Help

  4. #4
    PS3 User Gizmo356's Avatar
    Join Date
    Feb 2006
    Age
    32
    Posts
    1,756
    Rep Power
    120

    Default

    No It Can Play A Lot More And You Could Store Attk And Def Points In A Table

  5. #5
    DCEmu Coder lmtlmt's Avatar
    Join Date
    Jan 2006
    Location
    Brisbane, Australia
    Posts
    1,755
    Rep Power
    89

    Default

    here is an example of what the cards on the game will be like, the big one is the card when it is in your hand and the little one is the card when its on the field

  6. #6
    DCEmu Coder lmtlmt's Avatar
    Join Date
    Jan 2006
    Location
    Brisbane, Australia
    Posts
    1,755
    Rep Power
    89

    Default

    is this table good enough for this type of game, the table is for this card, here is the table
    mystical elf = { 800, 2000, 4, "[spellcaster]" }
    mystical elf[1] = "attack"
    mystical elf[2] = "defence"
    mystical elf[3] = "level"
    mystical elf[4] = "type"
    or should the table be like this
    mystical_elf = { 800, 2000, 4, "[spellcaster]" }
    attack = mystical_elf[1]
    defence = mystical_elf[2]
    level = mystical_elf[3]
    type = mystical_elf[4]
    ps> how do i make it so when that card id selected that information is printed to the screen next to it:confused:

    do i do this

    screen:print(100, 100, mystical_elf[1],green)
    screen:print(100, 140, mystical_elf[2],green)
    screen:print(100, 180, mystical_elf[3],green)
    screen:print(100, 220, mystical_elf[4],green)

  7. #7
    PS3 User Gizmo356's Avatar
    Join Date
    Feb 2006
    Age
    32
    Posts
    1,756
    Rep Power
    120

    Default

    No It Cant Play Mp3 But Why Would U Convert Them To .it It Could Change A 3meg Song To 300kb And Ill Help U When I Get Home

  8. #8
    DCEmu Coder lmtlmt's Avatar
    Join Date
    Jan 2006
    Location
    Brisbane, Australia
    Posts
    1,755
    Rep Power
    89

    Default

    ok ps

    i have edited my script and thought it would work but it still doesnt, and i have no ideah why. here it is, i was just trying to load the background.

    --IMAGES
    background = Image.load("YUGI BACKGROUND.png")
    title = Image.load("title.png")
    card1 = Image.load("SDY-001.jpeg")
    card2 = Image.load("SDY-002.jpeg")
    card3 = Image.load("SDY-003.jpeg")
    card4 = Image.load("SDY-004.jpeg")
    card5 = Image.load("SDY-005.jpeg")
    card6 = Image.load("SDY-006.jpeg")
    card7 = Image.load("SDY-007.jpeg")
    card8 = Image.load("SDY-008.jpeg")
    card9 = Image.load("SDY-009.jpeg")
    card10 = Image.load("SDY-010.jpeg")
    card11 = Image.load("SDY-011.jpeg")
    card12 = Image.load("SDY-012.jpeg")
    card13 = Image.load("SDY-013.jpeg")
    card14 = Image.load("SDY-014.jpeg")
    card15 = Image.load("SDY-015.jpeg")
    card16 = Image.load("SDY-016.jpeg")
    card17 = Image.load("SDY-017.jpeg")
    card18 = Image.load("SDY-018.jpeg")
    card19 = Image.load("SDY-019.jpeg")
    card20 = Image.load("SDY-020.jpeg")
    card21 = Image.load("SDY-021.jpeg")
    card22 = Image.load("SDY-022.jpeg")
    card23 = Image.load("SDY-023.jpeg")
    card24 = Image.load("SDY-024.jpeg")
    card25 = Image.load("SDY-025.jpeg")
    card26 = Image.load("SDY-026.jpeg")
    card27 = Image.load("SDY-027.jpeg")
    card28 = Image.load("SDY-028.jpeg")
    card29 = Image.load("SDY-029.jpeg")
    card30 = Image.load("SDY-030.jpeg")
    card31 = Image.load("SDY-031.jpeg")
    card32 = Image.load("SDY-032.jpeg")
    card33 = Image.load("SDY-033.jpeg")
    card34 = Image.load("SDY-034.jpeg")
    card35 = Image.load("SDY-035.jpeg")
    card36 = Image.load("SDY-036.jpeg")
    card37 = Image.load("SDY-037.jpeg")
    card38 = Image.load("SDY-038.jpeg")
    card39 = Image.load("SDY-039.jpeg")
    card40 = Image.load("SDY-040.jpeg")
    card41 = Image.load("SDY-041.jpeg")
    card42 = Image.load("SDY-042.jpeg")
    card43 = Image.load("SDY-043.jpeg")
    card44 = Image.load("SDY-044.jpeg")
    card45 = Image.load("SDY-045.jpeg")
    card46 = Image.load("SDY-046.jpeg")
    card47 = Image.load("SDY-047.jpeg")
    card48 = Image.load("SDY-048.jpeg")
    card49 = Image.load("SDY-049.jpeg")
    card50 = Image.load("SDY-050.jpeg")
    cardback = Image.load("about_fraud_back_auth.jpeg")

    -- COLOURS
    black = Color.new(0, 0, 0)
    white = Color.new(255, 255, 255)
    blue = Color.new(0, 128, 255)
    red = Color.new(255, 0, 0)
    green = Color.new(0, 255, 0)

    screen:blit(0,0,background,false)


    screen.flip()
    screen.waitVblankStart()

    end

  9. #9
    DCEmu Legend ACID's Avatar
    Join Date
    Feb 2006
    Location
    6 Feet Under
    Posts
    2,348
    Rep Power
    83

    Default

    I wish i was at home to help. Hope fully the good gizmo can help sooner then i can. All i can say is everithing he said is correct.

  10. #10
    DCEmu Legend ACID's Avatar
    Join Date
    Feb 2006
    Location
    6 Feet Under
    Posts
    2,348
    Rep Power
    83

    Default

    lmtlmt you can see he is not onlyne right now by the red button on under his avatar. So try not to keep on double posting for no reason. Now go under member list and hunt down a lua coder and send them a Pm if they can help they will trust me.

Page 1 of 7 12345 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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