Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Announcements
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 10-10-2012, 12:00 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
Exclamation triggerclient change

Soon a new npcserver will be uploaded which enforces correct triggerclient syntax. It must be:

player.triggerclient("weapon", "weaponname", params...)

Instead of "weapon" you can also use "gui". "npc" is not supported yet, it's currently only supported for triggerserver().
This change has been made to speed it up (can speed up some servers 1-2% cpu time since it's called often with a lot of parameters), and to match the syntax of triggerserver().

Update:
You can still provide more than 3 parameters, it's combining all additional parameters to an array/comma text anyway, works with all Graal script functions which expect a string as last parameter (scheduleevent etc.). It's just enforcing that you provide the "gui" or "weapon" parameter.

Last edited by Admins; 10-10-2012 at 09:01 PM..
Reply With Quote
  #2  
Old 10-10-2012, 08:56 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
So~, what's the difference to current behavior? Syntax still seems to be the same to me.
__________________
Reply With Quote
  #3  
Old 10-10-2012, 03:17 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Soon you're going to break Zodiac unless I change 100s of triggerclient references.
__________________
Quote:
Reply With Quote
  #4  
Old 10-10-2012, 04:14 PM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
I've always used the
triggerclient("weapon/gui", "weaponname", params)
syntax.
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #5  
Old 10-10-2012, 04:34 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by BlueMelon View Post
I've always used the
triggerclient("weapon/gui", "weaponname", params)
syntax.
Is there another one? :/
__________________
Reply With Quote
  #6  
Old 10-10-2012, 05:53 PM
ffcmike ffcmike is offline
Banned
Join Date: Jul 2004
Location: London
Posts: 2,029
ffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond reputeffcmike has a reputation beyond repute
Send a message via AIM to ffcmike Send a message via MSN to ffcmike
I would guess the difference is between doing:

PHP Code:
player.triggerclient("gui""weaponname"param1param2param3); 
and

PHP Code:
player.triggerclient("gui""weaponname", {param1param2param3}); 
I recently tested putting all parameters within one array as an optimisation but ran into problems when using multi-dimensional arrays.
Reply With Quote
  #7  
Old 10-10-2012, 06:00 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Oh, that.. ugh. Not a nice change.
__________________
Reply With Quote
  #8  
Old 10-10-2012, 08:59 PM
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
You can still provide more than 3 parameters, it's combining all additional parameters to an array/comma text anyway, works with all Graal script functions which expect a string as last parameter (scheduleevent etc.). It's just enforcing that you provide the "gui" or "weapon" parameter.
Reply With Quote
  #9  
Old 10-10-2012, 09:24 PM
0PiX0 0PiX0 is offline
Coder
0PiX0's Avatar
Join Date: Jan 2011
Posts: 130
0PiX0 is a jewel in the rough0PiX0 is a jewel in the rough
you can no longer do triggerclient(weaponname, params...)

the correct syntax is still the same:

triggerclient("gui", weaponname, params...)
or
triggerclient("weapon", weaponname, params...)
__________________
Reply With Quote
  #10  
Old 10-10-2012, 09:27 PM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
Edit: Late post

Either I got the wrong understanding or you guys do.
What I understood,

You must use:
triggerclient("weapon/gui", "weaponname", params)

And you will no longer be able to use:
triggerclient(this.name, params)
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
  #11  
Old 10-10-2012, 09:46 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
I wasn't even aware you could do that.
__________________
Reply With Quote
  #12  
Old 10-10-2012, 09:46 PM
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
Exactly
I've fixed most scripts on Zodiac, should be ok hopefully. I will also add an echo/syntaxerror.txt output if the first parameter is incorrect.
Reply With Quote
  #13  
Old 10-11-2012, 02:52 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Stefan View Post
Exactly
I've fixed most scripts on Zodiac, should be ok hopefully. I will also add an echo/syntaxerror.txt output if the first parameter is incorrect.
Thanks, I double-checked and confirmed you got everything.
__________________
Quote:
Reply With Quote
  #14  
Old 10-12-2012, 04:38 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Thanks for keeping us posted on changes.
__________________
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:17 AM.


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