Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #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
  #2  
Old 05-21-2005, 08:29 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Maybe there should be a thread for GS2 bugs only x-x
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #3  
Old 05-21-2005, 08:36 PM
Fry Fry is offline
Registered User
Fry's Avatar
Join Date: Sep 2001
Location: Germany
Posts: 384
Fry has a spectacular aura about
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.
__________________
Graal Statistics

Top 3 servers at the moment (players):


Reply With Quote
  #4  
Old 05-21-2005, 08:55 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally Posted by Fry
Probably, yes, but then again, there isn't that much going on here.
Happens on another sections too, unfortunately.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #5  
Old 05-22-2005, 12:54 PM
Fry Fry is offline
Registered User
Fry's Avatar
Join Date: Sep 2001
Location: Germany
Posts: 384
Fry has a spectacular aura about
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.
__________________
Graal Statistics

Top 3 servers at the moment (players):



Last edited by Fry; 05-22-2005 at 03:24 PM..
Reply With Quote
  #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
  #7  
Old 05-22-2005, 03:06 PM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
...

-- means decrement value of variable. It is the equivilent of var = var - 1;
Reply With Quote
  #8  
Old 05-22-2005, 05:01 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 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
Reply With Quote
  #9  
Old 05-22-2005, 06:10 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by KuJi
If your talking to me, I don't even know Gscript2
Apparently, you do not know gscript either.
__________________
Skyld
Reply With Quote
  #10  
Old 05-22-2005, 06:48 PM
Fry Fry is offline
Registered User
Fry's Avatar
Join Date: Sep 2001
Location: Germany
Posts: 384
Fry has a spectacular aura about
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.
__________________
Graal Statistics

Top 3 servers at the moment (players):



Last edited by Fry; 05-22-2005 at 06:59 PM..
Reply With Quote
  #11  
Old 05-23-2005, 12:18 AM
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 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.
Reply With Quote
  #12  
Old 05-23-2005, 01:30 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
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.
__________________
Reply With Quote
  #13  
Old 05-23-2005, 03:26 AM
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 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.
Reply With Quote
  #14  
Old 05-23-2005, 03:29 AM
Kaimetsu Kaimetsu is offline
Script Monkey
Kaimetsu's Avatar
Join Date: May 2001
Posts: 18,222
Kaimetsu will become famous soon enough
Quote:
Originally Posted by KuJi
It was just a thought.
Yes. A potentially misleading thought.
__________________
Reply With Quote
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 +2. The time now is 06:22 PM.


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