Raised This Month: $ Target: $400
 0% 

Decreasing a value


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-21-2005 , 19:41   Decreasing a value
Reply With Quote #1

Hey, I have this code right here:
Code:
new deaths = cs_get_user_deaths(id) new deaths2 = deaths - 1 cs_set_user_deaths(id,deaths2)

But it doesn't decrease the deaths.

Any help?
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 02-21-2005 , 20:00  
Reply With Quote #2

As far as I know, it only changes the ScoreBoard the following round...

Maybe it works for you, just wait till next round and look at your score then?
xeroblood is offline
Send a message via MSN to xeroblood
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-21-2005 , 20:18  
Reply With Quote #3

I did, lol.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 02-21-2005 , 21:31  
Reply With Quote #4

im not sure if this would work, but you could do something like this..

(NOTE: Code may not be right... i am a very new person to Small)

Code:
new deaths = cs_get_user_deaths(id) new deaths2 = deaths-- cs_set_user_deaths(id,deaths2)

the deaths-- will decrease the users deaths by 1

lemmie know if it works
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
Freecode
Never Fall Asleep
Join Date: Jan 2004
Old 02-22-2005 , 01:52  
Reply With Quote #5

or do this
Code:
cs_set_user_deaths(id,cs_get_user_deaths(id) - 1)
Freecode is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-22-2005 , 16:08  
Reply With Quote #6

That's all the same code only in different styles, I don't see how that helps contribute to the solving of the man's problem.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
Sp4rt4n
Senior Member
Join Date: Dec 2004
Old 02-22-2005 , 16:10   Re: Decreasing a value
Reply With Quote #7

He said this doesnt decrease the deaths:

Quote:
Originally Posted by v3x
Hey, I have this code right here:
Code:
new deaths = cs_get_user_deaths(id) new deaths2 = deaths - 1 cs_set_user_deaths(id,deaths2)
so i told him to try it this way... this is how i learned it would work in C++:

Code:
new deaths = cs_get_user_deaths(id) new deaths2 = deaths-- cs_set_user_deaths(id,deaths2)
Sp4rt4n is offline
Send a message via MSN to Sp4rt4n
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-22-2005 , 16:15  
Reply With Quote #8

Spartan, yours will decrease the value of deaths but return the old value. You woud need to use --deaths to get the new value.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 02-22-2005 , 17:39  
Reply With Quote #9

So what would work?? I'm confused .
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 02-22-2005 , 18:16  
Reply With Quote #10

Freecode's way is the way to go. Score on scoreboard SHOULD be updated as this is included in this native. If it doesn't something is wrong.
Johnny got his gun is offline
Reply



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 14:09.


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