Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-20-2006, 10:39 PM
_Z3phyr_ _Z3phyr_ is offline
Banned
Join Date: Sep 2003
Location: Louisiane
Posts: 390
_Z3phyr_ is an unknown quantity at this point
...array thing?

So anyway... I don't want to flood the 'Script Flags' tab with a bunch of different variables that aren't too important. I decide to make an array for a list that will keep count of an item when the weirdest discovery is made:

client.array[1]++;
and
client.array[variablehere]++;
^ ^ both incorrect???

but
client.variable++;
^ ^correct



my question:
"wtf?", and/or "how can I get around this without flooding the Script Flags tab? I was thinking of using tokens but then again that's an array too aint it?"

tokens[i]++;
^ ^incorrect

Last edited by _Z3phyr_; 09-21-2006 at 10:26 PM..
Reply With Quote
  #2  
Old 09-20-2006, 10:42 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 _Z3phyr_ View Post
So anyway... I don't want to flood the 'Script Flags' tab with a bunch of different variables that aren't too important. I decide to make an array for a list that will keep count of an item when the weirdest discovery is made:

client.array[1]++;
^ ^incorrect???

but
client.variable++;
^ ^correct



my question:
"wtf?", and/or "how can I get around this without flooding the Script Flags tab? I was thinking of using tokens but then again that's an array too aint it?"

tokens[1] += anything;
^ ^incorrect
Does client.array exist already? If not, try setarray or client.array = {0, 0};
Reply With Quote
  #3  
Old 09-20-2006, 11:14 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Quote:
Originally Posted by _Z3phyr_ View Post
client.array[1]++;
and
client.array[variablehere]++;
^ ^ both incorrect???
Graal Script Code:
client.array = new[ 2];
increaseVar13);
function 
increaseVarindby)
  
client.array[ ind] += by
client.array is now 0,3
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #4  
Old 09-21-2006, 12:20 AM
_Z3phyr_ _Z3phyr_ is offline
Banned
Join Date: Sep 2003
Location: Louisiane
Posts: 390
_Z3phyr_ is an unknown quantity at this point
Nice I can respond as frequently as I want now! (or until unixmad and them fix the thing...)

I figured out the problem myself yall. I appreciate the attemps/help/"hmphs", though.



Apparently array[index]+=1 works but array[index]++ doesnt.
Reply With Quote
  #5  
Old 09-21-2006, 12: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 _Z3phyr_ View Post
Nice I can respond as frequently as I want now! (or until unixmad and them fix the thing...)

I figured out the problem myself yall. I appreciate the attemps/help/"hmphs", though.



Apparently array[index]+=1 works but array[index]++ doesnt.
Hey.. didnt i pm you += 1 instead of ++?
Reply With Quote
  #6  
Old 09-21-2006, 01:25 AM
_Z3phyr_ _Z3phyr_ is offline
Banned
Join Date: Sep 2003
Location: Louisiane
Posts: 390
_Z3phyr_ is an unknown quantity at this point
In order to fix my problem, I had to make declare the variable in a seperate NPC instead of in the NPC that I wanted to use the array in.

I don't know wtf is up, but I found a solution. +=1 didn't work on the NPC that I was trying to work with it in, and even in the second NPC that I used to declare it beforehand wouldn't let ++ work.

So yeah.
Reply With Quote
  #7  
Old 09-21-2006, 01:59 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
There shouldn't be such problems. Client.vars are special though. For checking what the problem is I would need the full script or at least the part that is doing the logic.
Reply With Quote
  #8  
Old 09-21-2006, 03:47 AM
_Z3phyr_ _Z3phyr_ is offline
Banned
Join Date: Sep 2003
Location: Louisiane
Posts: 390
_Z3phyr_ is an unknown quantity at this point
Would you like me to forum PM it to you or something?
Reply With Quote
  #9  
Old 09-21-2006, 09:35 AM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Quote:
Originally Posted by _Z3phyr_ View Post
Would you like me to forum PM it to you or something?
Just post it in here, maybe we response faster then Stefan, he's a busy man
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #10  
Old 09-21-2006, 02:58 PM
_Z3phyr_ _Z3phyr_ is offline
Banned
Join Date: Sep 2003
Location: Louisiane
Posts: 390
_Z3phyr_ is an unknown quantity at this point
>_> No thanks, Mr."Let me into Delteria Dev or else I won't work for you" -- I'm good.

issue solved. fermez ce thread svp?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 03:19 PM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.