![]() |
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() {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. |
Maybe there should be a thread for GS2 bugs only x-x
|
Quote:
|
Quote:
|
Well, found another bug and didn't want to create a new thread for it,
level.players doesn't work, it's always empty, level.npcs works fine. Additionally, the old "npcs[i]" never works, "players[i]" only works when the weapon has been triggered from the clientside. (Everything is serverside and in a weapon. players[i] works in level npcs) EDIT: Also, I can't assign stuff like level.npcs to temp. variables and use it afterwards. Even though level.npcs isn't 0/nothing and I can use it, I am unable to use the variable I assigned level.npcs to. |
Quote:
Well, you have -- their so it won't set it, but instead minus? Unless you "--" (quote it) |
...
-- means decrement value of variable. It is the equivilent of var = var - 1; |
Quote:
|
Quote:
|
Quote:
|
Quote:
And: Why are you so negative? I don't even think your post even tried to help him. I tried, but I was wrong. Don't have to go and try to "make fun of me" because I am wrong. |
Quote:
The reason you're being criticised is not that you're wrong - it's that you're attempting to give advice despite knowing that you're not a skilled scripter. If nothing else, it has the potential to mislead any other person with the same inexperience as you. |
Quote:
Quote:
It was just a thought. |
Quote:
|
| All times are GMT +2. The time now is 07:10 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.