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. |
So~, what's the difference to current behavior? Syntax still seems to be the same to me.
|
Soon you're going to break Zodiac unless I change 100s of triggerclient references.
|
I've always used the
triggerclient("weapon/gui", "weaponname", params) syntax. |
Quote:
|
I would guess the difference is between doing:
PHP Code:
PHP Code:
|
Oh, that.. ugh. Not a nice change.
|
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.
|
you can no longer do triggerclient(weaponname, params...)
the correct syntax is still the same: triggerclient("gui", weaponname, params...) or triggerclient("weapon", weaponname, params...) |
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) |
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. |
I wasn't even aware you could do that.
|
Quote:
|
Thanks for keeping us posted on changes.
|
All times are GMT +2. The time now is 07:52 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.