View Single Post
  #6  
Old 05-22-2005, 03:04 PM
KuJi KuJi is offline
Banned
Join Date: Apr 2004
Location: Staten Island, New York
Posts: 2,202
KuJi will become famous soon enough
Send a message via ICQ to KuJi Send a message via AIM to KuJi Send a message via MSN to KuJi Send a message via Yahoo to KuJi
Quote:
Originally Posted by Fry
Well, I've got two bugs here and as I am bad at describing stuff, I guess it'd be the best to make examples.

1. Increment/Decrement operators
When using -- or ++ on a client* String List the Value doesn't get saved, the script after it does know of the change though.
Example:
HTML Code:
function onWeaponFired() {
  player.client.foo = "10,20,30";
  player.client.foo[1] --;
  player.chat = player.client.foo[1];
}
Will show you the value you would've expected, but when you look at the player attributes you see the client.foo string is still "10,20,30".

2. client* String Lists aren't beeing updated correctly
If you executed the previous code multiple times you might've noticed that every time you fire the weapon, player.client.foo[1] actually decreases by one, so first its 19, then 18 and so on... even though the value has been set before.
EDIT: This bug seems to be associated with --/++ as it only happens when using them. Works fine with -= 1;

I hope you understand it, the best thing would be to use that example, it should become obvious then.
I tried this code both clientside and serverside with the same results.
Just a thought:
Well, you have -- their so it won't set it, but instead minus?

Unless you "--" (quote it)
Reply With Quote