Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   GS2: Problems with (client*) String Lists (https://forums.graalonline.com/forums/showthread.php?t=59043)

Fry 05-21-2005 08:25 PM

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.

osrs 05-21-2005 08:29 PM

Maybe there should be a thread for GS2 bugs only x-x

Fry 05-21-2005 08:36 PM

Quote:

Originally Posted by osrs
Maybe there should be a thread for GS2 bugs only x-x

Probably, yes, but then again, there isn't that much going on here.

osrs 05-21-2005 08:55 PM

Quote:

Originally Posted by Fry
Probably, yes, but then again, there isn't that much going on here.

Happens on another sections too, unfortunately.

Fry 05-22-2005 12:54 PM

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.

KuJi 05-22-2005 03:04 PM

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)

Rick 05-22-2005 03:06 PM

...

-- means decrement value of variable. It is the equivilent of var = var - 1;

KuJi 05-22-2005 05:01 PM

Quote:

Originally Posted by Rick
...

-- means decrement value of variable. It is the equivilent of var = var - 1;

If your talking to me, I don't even know Gscript2

Skyld 05-22-2005 06:10 PM

Quote:

Originally Posted by KuJi
If your talking to me, I don't even know Gscript2

Apparently, you do not know gscript either.

Fry 05-22-2005 06:48 PM

Quote:

Originally Posted by KuJi
If your talking to me, I don't even know Gscript2

Please don't post here then, these bugs need fixing as they are definatly limiting the use of GS2.

KuJi 05-23-2005 12:18 AM

Quote:

Originally Posted by Skyld
Apparently, you do not know gscript either.

I know what -- means, but i know absolutely nothing on gscript2.

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.

Kaimetsu 05-23-2005 01:30 AM

Quote:

Originally Posted by KuJi
I know what -- means, but i know absolutely nothing on gscript2

...so you assumed that it means something completely different? You're not fooling anybody.

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.

KuJi 05-23-2005 03:26 AM

Quote:

Originally Posted by Kaimetsu
...so you assumed that it means something completely different? You're not fooling anybody.

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.

I believe I said:

Quote:

Originally Posted by KuJi
Just a thought:


It was just a thought.

Kaimetsu 05-23-2005 03:29 AM

Quote:

Originally Posted by KuJi
It was just a thought.

Yes. A potentially misleading thought.


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.