Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-17-2009, 07:00 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
clientr.var inconsistancy

I set various clientr.vars with my system. For example, I have one that increases a clientr.var whenever I slash a bush, like so:
findplayer(params[1]).clientr.bushstat += params[2];
Which increases appropriately by params[2].

However, I also have clientr.vars that enables/disables certain modes in my system, like so:
findplayer(params[1]).clientr.enablesword = params[2];
Which sets it to true/false.

The first example shows up in my client.vars list in RC. The second does not. The second is recognized by scripts however(as my scripts function fine), but like I said... it doesn't appear in my player attributes on RC. Does this have to do with true/false being used in client.vars or something?
Reply With Quote
  #2  
Old 09-17-2009, 07:10 PM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
Quote:
Originally Posted by DustyPorViva View Post
I set various clientr.vars with my system. For example, I have one that increases a clientr.var whenever I slash a bush, like so:
findplayer(params[1]).clientr.bushstat += params[2];
Which increases appropriately by params[2].

However, I also have clientr.vars that enables/disables certain modes in my system, like so:
findplayer(params[1]).clientr.enablesword = params[2];
Which sets it to true/false.

The first example shows up in my client.vars list in RC. The second does not. The second is recognized by scripts however(as my scripts function fine), but like I said... it doesn't appear in my player attributes on RC. Does this have to do with true/false being used in client.vars or something?
if the flag is set to true, it will appear in the list, if it is false, it won't.

If it doesn't exist, it will evaluate to false.
Reply With Quote
  #3  
Old 09-17-2009, 07:26 PM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Quote:
Originally Posted by Mark Sir Link View Post
if the flag is set to true, it will appear in the list, if it is false, it won't.

If it doesn't exist, it will evaluate to false.
Hmm... guess I never thought of that, however I can't remember if I encounted the problem even if it was true or not. Ah well!
Reply With Quote
  #4  
Old 09-17-2009, 07:30 PM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
Quote:
Originally Posted by DustyPorViva View Post
Hmm... guess I never thought of that, however I can't remember if I encounted the problem even if it was true or not. Ah well!
it seems like it may be functioning similar to how set and unset flags used to work in GS1 (mostly pre-NPC Server) where flags were being used as booleans quite a bit.
Reply With Quote
  #5  
Old 09-18-2009, 02:36 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
It is annoying and I've been caught out a few times but this but any string with a null value disappears =(
Reply With Quote
  #6  
Old 09-19-2009, 12:56 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
False/null/"" is the default value, if you set a network string (client., clientr, server., serverr.) to such value then it is removed, means less data to send and an easy way to clear variables.
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 08:31 AM.


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