Since there are no topics about this (as far as the forum search will tell me), I am going ahead and posting a topic.
When I make my program into an .EXE file (whether 'Build EXE' or 'Build Final') the program doesn't start and gives me a Runtime Error 99. I have built my program previously with no problems but for some reason, it will not work as an EXE now after altering the code a little (I don't recall changing anything pertinent). However, when running the code in DBC, it runs fine.
Here is the code and maybe someone can catch something I am obviously overlooking.
rem -------------------------
rem Earthbounded Tech Demo v 0.02
rem By Synbios128
rem -------------------------
autocam off : sync rate 0
hide mouse : sync on
set global collision on
rem Make four walls
make object box 1,10,200,250 : position object 1,-100,100,0 : color object 1,rgb(155,40,20)
make object box 2,10,200,250 : position object 2, 100,100,0 : color object 2,rgb(155,40,20)
make object box 3,250,200,10 : position object 3, 0,100,-100 : color object 3,rgb(155,40,20)
make object box 4,250,200,10 : position object 4, 0,100,100 : color object 4,rgb(155,40,20)
rem Make a floor and create texture for it
make object box 5,245,10,245
position object 5,0,-5,0
color object 5,rgb(70,50,50)
rem Make a player object (and a non-rotated collision box for it)
load object "./Onett/Ness_House/Ness_Room/blue_chair01.x",11
position object 11,0,0,0
make object collision box 11,-5,-5,-5,5,5,5,0
disable object zdepth 11
fix object pivot 11
rem Make the wall and floor objects into static objects (for auto-camera collision)
for t=1 to 5
make static object t
objx#=object position x(t)
objy#=object position y(t)
objz#=object position z(t)
objsx#=object size x(t)/2.0
objsy#=object size y(t)/2.0
objsz#=object size z(t)/2.0
make static collision box objx#-objsx#,objy#-objsy#,objz#-objsz#,objx#+objsx#,objy#+objsy#,objz#+objsz#
delete object t
next t
rem Load "blue_chair01.x" into scene
load object "./Onett/Ness_House/Ness_Room/blue_chair01.x",20
position object 20, 0, 0, -30
rotate object 20,0,310,0
make object collision box 20,-5,-5,-5,5,5,5,0
disable object zdepth 20
rem Load "blue_table.x" into scene
load object "./Onett/Ness_House/Ness_Room/blue_table.x",21
position object 21, 15, 0, -30
make object collision box 21, -5,-5,-5,5,5,5,0
disable object zdepth 21
rem Load "bookshelf.x" into scene
load object "./Onett/Ness_House/Ness_Room/bookshelf.x",22
position object 22, -20, 0, 30 : scale object 22, 150,150,150
make object collision box 22, -7,-7,-7,7,7,7,0
disable object zdepth 22
rem Load "shelf.x" into scene
load object "./Onett/Ness_House/Ness_Room/shelf.x",23
position object 23, 0, 0, 30 : scale object 23, 150,150,150
make object collision box 23, -8,-8,-8,8,8,8,0
disable object zdepth 23
rem Main loop
do
rem Display text at top center
ink rgb(255,255,255),0
center text 320,2,"Earthbounded Tech Demo v 0.02 by Synbios128"
center text 320,15,"Use the UP,DOWN,LEFT, and RIGHT arrow keys to control character."
rem Give control to the player
if upkey()=1 then yrotate object 11,0 : move object 11,1.5
if rightkey()=1 and upkey()=1 then yrotate object 11,45.0
if rightkey()=1 then yrotate object 11,90 : move object 11,1.5
if downkey()=1 and rightkey()=1 then yrotate object 11,135
if downkey()=1 then yrotate object 11,180 : move object 11,1.5
if leftkey()=1 and downkey()=1 then yrotate object 11,225
if leftkey()=1 then yrotate object 11,270 : move object 11,1.5
if leftkey()=1 and upkey()=1 then yrotate object 11,315
rem Get current object position
posx#=object position x(11)
posy#=object position y(11)
posz#=object position z(11)
rem Handle sliding collision for player object with other objects
position object 11,posx#,posy#,posz#
if object collision(11,0)>0
dec posx#,get object collision x()
dec posy#,get object collision y()
dec posz#,get object collision z()
endif
rem Ensure camera stays out of static collision boxes
if get static collision hit(oldposx#-s#,oldposy#-s#,oldposz#-s#,oldposx#+s#,oldposy#+s#,oldposz#+s#,posx#-s#,posy#-s#,posz#-s#,posx#+s#,posy#+s#,posz#+s#)=1
dec posx#,get static collision x()
dec posy#,get static collision y()
dec posz#,get static collision z()
if get static collision y()<>0.0 then playergrav#=0.0
endif
rem Update with new object position
position object 11,posx#,posy#,posz#
rem Use camera tracker to follow player object
camdist#=85.0 : camhigh#=posy#+85.0 : camfade#=4.0
set camera to follow posx#,posy#,posz#,angle#,camdist#,camhigh#,camfade#,1
rem Tilt camera down a little
xrotate camera 47
rem Update screen
sync
rem End loop
loop