Raised This Month: $ Target: $400
 0% 

Variables between functions


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Kazalu
Senior Member
Join Date: Dec 2013
Location: Romania
Old 12-24-2014 , 10:42   Variables between functions
Reply With Quote #1

HTML Code:
public ctwin()
{
	CTrounds++;
	//return CTrounds;
}

public twin()
{
	Trounds++;
	//return Trounds;
}

public cmdScore( id )
{
	CTrounds = ctwin();
	Trounds = twin();
}
How can I get the return value of those functions, without modifying the variables in the process?

I mean, if I try to get Trounds in the cmdScore function, it will also add 1 to the variable value.
Kazalu is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 15:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode