
-----------------------------------
PmEe
Tue Dec 14, 2004 3:30 pm

Out of id numbers?
-----------------------------------
When i run my program for 1-2 minutes an error pops up Cannot allocate items: out of id numbers (max 1000)


how do i fix this

-----------------------------------
Delos
Tue Dec 14, 2004 3:34 pm


-----------------------------------
It would really help if you posted your code so that we could see why this is happening.

I have a feeling you're using Pic.New() functions in a loop without using Pic.Free(), but until i see the code I can't be sure.

-----------------------------------
PmEe
Tue Dec 14, 2004 3:36 pm


-----------------------------------
Yeah I am I was just about to post the code but the problem i had using pic.free with loops was it would exit the run and say variable was freed


process movement
    loop
        Pic.Draw (grass1, 0, 0, picCopy)
        Input.KeyDown (chars)
        if chars ('w') then
            y (1) := y (1) + 2
            view := 1
            Pics (1) := Pic.FileNew ("char1.bmp")
            if x (1) < x (2) + 27 and x (1) > x (2) - 27 and y (1) > y (2) - 27 and y (1) < y (2) + 27 then
                y (1) := y (1) - 5
            end if
        end if
        if chars ('d') then
            x (1) := x (1) + 2
            view := 2
            Pics (1) := Pic.FileNew ("charright1.bmp")
            if x (1) < x (2) + 27 and x (1) > x (2) - 27 and y (1) > y (2) - 27 and y (1) < y (2) + 27 then
                x (1) := x (1) - 5
            end if
        end if
        if chars ('a') then
            x (1) := x (1) - 2
            view := 3
            Pics (1) := Pic.FileNew ("charleft1.bmp")
            if x (1) < x (2) + 27 and x (1) > x (2) - 27 and y (1) > y (2) - 27 and y (1) < y (2) + 27 then
                x (1) := x (1) + 5
            end if
        end if
        if chars ('s') then
            y (1) := y (1) - 2
            view := 4
            Pics (1) := Pic.FileNew ("charfront1.bmp")
            if x (1) < x (2) + 27 and x (1) > x (2) - 27 and y (1) > y (2) - 27 and y (1) < y (2) + 27 then
                y (1) := y (1) + 5
            end if
        end if
        if chars ('.') and doo = 20 then
            fork attack
        end if
        doo += 1
        if doo > 20 then
            doo := 20
        end if
        if x (1) >= 640 then
            x (1) := x (1) - 40
        end if
        if x (1) = 480 then
            y (1) := y (1) - 40
        end if
        if y (1) 