Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-21-2005, 08:25 PM
Fry Fry is offline
Registered User
Fry's Avatar
Join Date: Sep 2001
Location: Germany
Posts: 384
Fry has a spectacular aura about
GS2: Problems with (client*) String Lists

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.
__________________
Graal Statistics

Top 3 servers at the moment (players):


Reply With Quote
 


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 +2. The time now is 09:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.