My brain is full of flup
by Steve Acaster · in Torque 3D Professional · 03/05/2011 (9:03 pm) · 5 replies
T3d 1.1 beta 3
win7 32bit
target:
schedule scripting and single tags
issue:
Repeat:
Make a schedule with single '' tags and see it fail. Then make one with normal "" tags and see it work.
Suggest:
fixit!
[edit]
Apparently I got the wrong end of the stick during a conversation on irc ... not the first time :P
win7 32bit
target:
schedule scripting and single tags
issue:
%this.schedule(500, 'function', %obj, %etc);Single tagged function (for network performance) fails to pass it's schedule. "Unknown Command"
%this.schedule(500, "function", %obj, %etc);Double tagged function passes it's schedule fine.
Repeat:
Make a schedule with single '' tags and see it fail. Then make one with normal "" tags and see it work.
Suggest:
fixit!
[edit]
Apparently I got the wrong end of the stick during a conversation on irc ... not the first time :P
About the author
One Bloke ... In His Bedroom ... Making Indie Games ...
#2
Single tags are supposed to send the ID of the string rather than the string.
Of course my brain does occaissionally go fuzzy ...
03/06/2011 (7:36 am)
I believe that was supposed to have changed after a chat with devs and also from reading code comments.Single tags are supposed to send the ID of the string rather than the string.
Of course my brain does occaissionally go fuzzy ...
#3
it not a schedule, I know, but,
is this an example of "Single tags are supposed to send the ID of the string rather than the string"?
it is a rather confusing subject
03/06/2011 (10:02 am)
Steve,CommandToClient(%obj.client, 'PopActionMap', moveMap);
it not a schedule, I know, but,
is this an example of "Single tags are supposed to send the ID of the string rather than the string"?
it is a rather confusing subject
#4
Nathan pretty much nailed it. As far as I can recall schedules never used (or were intended to use) tagged strings.
03/06/2011 (4:43 pm)
Quote:Never had much use for irc...
Apparently I got the wrong end of the stick during a conversation on irc ... not the first time :P
Nathan pretty much nailed it. As far as I can recall schedules never used (or were intended to use) tagged strings.
#5
03/15/2011 (6:47 am)
is there a way to get back to a string from a tagged string? I tested a function using commandToClient/Server, and passed an argument as tagged string, but I haven't found out, how to get back to a normal string afterwards, so I use my commands with normal strings and it works (on the behalf of greater network traffic)
Torque Owner Nathan Martin
TRON 2001 Network
APIs like Schedule() are executed only on the client or server side scripts, not networkable at all. If you want to start a schedule timer event on either the server or client you need to use one of the commands given above and then have the ServerCmdFunction() or ClientCmdFunction() RPC receive side associated function defined. Barely exampled at this TDN article which applies to all Torque engines. :)
So basically the engine is working as its suppose to as tagged strings cannot be translated back to normal stings on the same connection side that defined the tagged string in the first place as that same connection side never received said tagged string for referencing from what I recalled an old explanation of how tagged strings work. Also note that tagged strings were designed to go from Server to Client upon Client network establishment and then the Server will send out that tagged string identifier as a numerical value during actual tagged string usage and then the Client will know what string it is referencing.
Edit: I also need to add for anybody who finds this post later on that in scripts at least you need to use detag() on the receiving end of a tagged string in order to use it. Doing a file content search within the provided game examples with Torque 3D you'll find files like game/scripts/client/client.cs or game/core/scripts/client/message.cs as good examples of tagged string usage.