Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / problem with a funtion

Author
Message
Mizipzor
20
Years of Service
User Offline
Joined: 24th May 2004
Location: Sweden
Posted: 6th Jun 2004 00:50
Well, im trying, as suggested, to stop using subroutines and start to use functions.

This is the code for updating the cam each sync:


Problem is, it simply doesnt work I only see gray color over the whole screen. The funny part is that if I place the camera code outside of the function, plain and clutterly right in the main loop, it works!

I call the funtion with update_cam(). Full source included if you need more info.

Thanks in advance
Mizipzor

Dreaming of creating a highly advanced AI mind
Bishop
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: In my favorite chair...
Posted: 6th Jun 2004 01:12
i thinkit is because variables do not work in functions......variables like camdistance.....dont quote me cause i could be wrong.....try redifining camdistance in the function

cheers
bish

"When you were born, you cried and the world rejoiced. Live so when you die, the world cries and you rejoice."
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 6th Jun 2004 01:19
I haven't looked at your code but chances are the variables you are trying to manipulate within the function are not GLOBALly defined or are not passed in as params...just a guess


* DBP_NETLIB_v1.2 - NOW WITH VARIABLE WATCHER! * Click Logo
Mizipzor
20
Years of Service
User Offline
Joined: 24th May 2004
Location: Sweden
Posted: 6th Jun 2004 01:20
thanks... you were right!

its all solved out now... now i got another problem... well... i make a new thread of it... as it has to do with movement and not with the camera

thanks again

Dreaming of creating a highly advanced AI mind

Login to post a reply

Server time is: 2024-09-22 12:45:51
Your offset time is: 2024-09-22 12:45:51