All pastes #366645 Raw Edit

Anonymous

public text v1 · immutable
#366645 ·published 2007-02-21 20:33 UTC
rendered paste body

                `Log("Param "+ GetParam(parse$))

                        `Log("failed to select")

                    `log("select end")
                       ` id$=GetString(parse$)
function Load_Items()
    open to read 4,"Data\Item.ini"
    local sid$
      Log("Opened Items.ini")

        read string 4,parse$
      repeat

         if lower$(parse$)="[potion]"
            Log("Read potion")
            array insert at bottom Potions(0)
            inc gl_potions
            fail=1
            for t=1 to 10
                read string 4,parse$
                st$=GetParam(parse$)
                select st$
                    case "sid"
                        sid$="BLANK"
                        potions(gl_potions).sid=sid$
                    endcase
                    case "name"
                        potions(gl_potions).id=GetString(parse$)
                    endcase
                    case "unid"
                        potions(gl_potions).unid=GetString(parse$)
                    endcase
                    case "icon"
                        potions(gl_potions).media$=GetString(parse$)
                    endcase
                    case "mesh"
                        potions(gl_potions).mesh=GetString(parse$)
                    endcase
                    case "level"
                        potions(gl_potions).level=GetInt(parse$)
                    endcase
                    case "rarity"
                        potions(gl_potions).rarity=GetInt(parse$)
                    endcase
                    case default
                        fail=1
                    endcase
                endselect
                `Log("select finished")
                if fail=1 then exit
            next t
            `until fail=1
         else
            read string 4,parse$
         endif
        until file end(2)=1
    close file 4
endfunction