declare xxx for yyy
Posted: 14 Jul 2012, 06:28
Hi,
Like it was a good thing to have an explanation of the = vs <=>, i guess that an explanation of the 'declare xxx for yyy = val;' would be a good thing. And both would be included (or linked) in the Gugli's Syntax basics.
All I can guess is that for example 'declare Integer TotalCaptureTime for Player' create a variable TotalCaptureTime associated/linked to the current Player object, so that if later I again do a 'declare Integer TotalCaptureTime for Player' with the same Player object then I get the same variable with the same value again ?
If that's it, what is the scope/existence of that variable ? current script ? any script running on the same game server ? any script accessing the same object, even remotely like a client maniascript UI ???
Edit: seeing a compiler message i got, the real name seems to be 'attribute'. And because they can be attached dynamically on an existing object, 'dynamic attribute' is probably a better name. Also, note that not all kind of object will accept to attach dynamic attributes.
Like it was a good thing to have an explanation of the = vs <=>, i guess that an explanation of the 'declare xxx for yyy = val;' would be a good thing. And both would be included (or linked) in the Gugli's Syntax basics.
All I can guess is that for example 'declare Integer TotalCaptureTime for Player' create a variable TotalCaptureTime associated/linked to the current Player object, so that if later I again do a 'declare Integer TotalCaptureTime for Player' with the same Player object then I get the same variable with the same value again ?
If that's it, what is the scope/existence of that variable ? current script ? any script running on the same game server ? any script accessing the same object, even remotely like a client maniascript UI ???
Edit: seeing a compiler message i got, the real name seems to be 'attribute'. And because they can be attached dynamically on an existing object, 'dynamic attribute' is probably a better name. Also, note that not all kind of object will accept to attach dynamic attributes.