Hi! I have programmed in db for a year or so and now I need help. I am making a rts with my friend. I press 1 and it says error object exists
Menu:
load image "IM MENU.jpg",1000
set text size 12
paste image 1000,0,0
blue=RGB(0,128,255)
white=RGB(90,30,50)
selectedItem=1
hold=1
do
paste image 1000,900,900
`print menu items
if selectedItem=1 then ink blue,0 else ink white,0
text 200,400,"Play Game"
if selectedItem=2 then ink blue,0 else ink white,0
text 300,400,"Load/Save"
if selectedItem=3 then ink blue,0 else ink white,0
text 400,400,"Commands"
if selectedItem=4 then ink blue,0 else ink white,0
text 500,400,"Exit"
`select menu items
if leftkey()=1 and hold=0 then dec selectedItem : hold=1
if rightkey()=1 and hold=0 then inc selectedItem : hold=1
if selectedItem>4 then selectedItem=1
if selectedItem<1 then selectedITem=4
`choose what to do when an item is selected
if returnkey()=1 and hold=0
hold=1
`play game
if selectedItem=1 then goto main
`display instructions
if selectedItem=2
load image "Option Menu.bmp",1001
delete image 1000
paste image 1001,0,0
`clear up after myself
load image "IM MENU.jpg",1000
paste image 1000,0,0
delete image 1001
endif
`display information about the game
if selectedItem=3
load image "Saveload.bmp",1001
delete image 1000
paste image 1001,0,0
sync
suspend for key
`clear up after myself
load image "IM MENU.jpg",1000
paste image 1000,0,0
delete image 1001
endif
`quit the game
if selectedItem=4
end
endif
endif
if scancode()=0 then hold=0
sync
loop
Main:
load image "SA.jpg",20 : paste image 20,0,0
make matrix 1,9000,9000,20,20
load image "GameModels/grass15.bmp",31
prepare matrix texture 1,31,1,1
do
if inkey$()="1" then load object "Models(euro)/Walls/Castle Walls/Castle wall Dark-rennasaince.x",1 : position object 1,4500,0,4500
if object exist (1) then load object "Models(euro)/Walls/Castle Walls/Castle wall Dark-rennasaince.x",2 : position object 2,4500,0,4500
position camera 0,700,0
loop
Ummm....is db good....