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.

DarkBASIC Professional Discussion / changing value states in functions

Author
Message
Daniel wright 2311
User Banned
Posted: 18th Apr 2011 23:57 Edited at: 19th Apr 2011 00:02
Can you change value states in functions? I am asking becouse Im starting to see how much code I can kill by usung functions but I set up this function to pass some value states with nothing happing.So my question is can I? here is the function with real time states.



edit:

I made thease 2 functions here and they work great but only becouse they are commands and not states.



my signature keeps being erased by a mod So this is my new signature.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Apr 2011 00:04
It looks like you are trying to set variables that exist outside of the function. You should declare those values you want to affect as global.



Daniel wright 2311
User Banned
Posted: 19th Apr 2011 00:13
Ok, I understand, I did not have them set to global,I did have them set but not to global, thanks ill try it.

my signature keeps being erased by a mod So this is my new signature.

Login to post a reply

Server time is: 2026-07-18 14:26:36
Your offset time is: 2026-07-18 14:26:36