Hallo. I'm new to DB, I try to read diffrent tutorials and learn.
I was reading about functions and decided to try them and have this problem:
This code works:
SHOW MOUSE
rem sync on
rem sync rate 25
TitleID = 1
rem FUNCTION MakeTitle(TitleID,TitleType)
MAKE OBJECT PLAIN TitleID, 5, 5
LOAD IMAGE "textures\grass.jpg", 1
TEXTURE OBJECT TitleID, 1
ROTATE OBJECT TitleID, 90, 0, 0
POSITION OBJECT TitleID, 0, 0, 0
rem sync
rem endfunction
rem MakeTitle(1,1)
POSITION CAMERA -50, 50, -50
POINT CAMERA 0, 0, 0
SET AMBIENT LIGHT 75
do
loop
But when I use a function, It doesn't.
SHOW MOUSE
rem sync on
rem sync rate 25
rem TitleID = 1
FUNCTION MakeTitle(TitleID,TitleType)
MAKE OBJECT PLAIN TitleID, 5, 5
LOAD IMAGE "textures\grass.jpg", 1
TEXTURE OBJECT TitleID, 1
ROTATE OBJECT TitleID, 90, 0, 0
POSITION OBJECT TitleID, 0, 0, 0
rem sync
endfunction
MakeTitle(1,1)
POSITION CAMERA -50, 50, -50
POINT CAMERA 0, 0, 0
SET AMBIENT LIGHT 75
do
loop
Can You please tell me where the problem lies?