I was wondering if there are any issues on this platform with reusing variables. Does anyone have anything good or bad to say about it?
Example:
void main()
{
string sMsg = "Hello!";
ActionSpeakString(sMsg,TALKVOLUME_TALK);
sMsg = "New Data"
ActionSpeakString(sMsg,TALKVOLUME_TALK);
}
Oh and how do I make code brackets on this forum? Thanks!
Is it ok to reuse the same variable but change the value?
Débuté par
AmbrosiaPW
, avril 26 2011 06:35
#1
Posté 26 avril 2011 - 06:35
#2
Posté 26 avril 2011 - 07:25
Yes, you can reuse a variable within the same script.
As far as code brackets, how about placing the word "code" between two square brackets, the second with a slash "/" before the word "code"?
[code][/code]
#3
Posté 26 avril 2011 - 07:49
im using fore code brackets quoting actually. It formats the text better than code.
#4
Posté 26 avril 2011 - 04:19
If you could not change the value of variables, they would not be variables, they would be constants.
#5
Posté 26 avril 2011 - 05:45
haha yeah yeahLightfoot8 wrote...
If you could not change the value of variables, they would not be variables, they would be constants.
I was just wondering if there may have been a funny parsing order. Ya know, like it doesn't destroy the item till the end. I just wanted to make sure I didnt waste my time.
I tried using [code=auto:0] and it didn't seem to do anything.





Retour en haut






