IsPlayerNearObject - Problem
#7

box1 must be defined outside any function otherwise the variable will only work within the range of said function.

Global variables are those which are defined outside any callback/function and are intended to be globally used among all the callbacks.
Local variables, are those defined within a function, they can't overlay global variables (but can overlay other local variables in other functions) and will get erased once the function has been processed.


EDIT: Ninja'd again, I hate this!
Reply


Messages In This Thread
IsPlayerNearObject - Problem - by Avi Raj - 14.02.2014, 12:43
Re: IsPlayerNearObject - Problem - by newbienoob - 14.02.2014, 12:51
Re: IsPlayerNearObject - Problem - by Konstantinos - 14.02.2014, 12:52
Re: IsPlayerNearObject - Problem - by CuervO - 14.02.2014, 12:53
Re: IsPlayerNearObject - Problem - by Avi Raj - 14.02.2014, 12:53
Re: IsPlayerNearObject - Problem - by Konstantinos - 14.02.2014, 12:56
Re: IsPlayerNearObject - Problem - by CuervO - 14.02.2014, 12:57
Re: IsPlayerNearObject - Problem - by Avi Raj - 14.02.2014, 13:00
Re: IsPlayerNearObject - Problem - by Konstantinos - 14.02.2014, 13:01
Re: IsPlayerNearObject - Problem - by Avi Raj - 14.02.2014, 13:05

Forum Jump:


Users browsing this thread: 4 Guest(s)