1
Modification Help / Tagged String Conversion
« on: April 02, 2013, 12:29:38 AM »
I'm having troubles with tagged strings, I think. I'm not entirely sure what the issue is, since they output funnily into the console which makes it hard to debug.
What I essentially am trying to do is to append a tagged string as a field on an existing string. The reason for a tagged string is because it is a command for use in the commandToServer function.
Let's say I've got the tagged string 'light' stored in variable %tagStr. I then create a longer string like such:
Now when I output getField(%theStringAbove,3) to the console, it says something like "88 light". Which I think is messing up the function call:
Now with the light example, this works when hosting my own server. But it doesn't work when a player on my server does the exact same method.
This may have something to do with my client and server being like a melting pot of functions and thus it only works for me. Any ideas though why this wouldn't work for a player in my server?
Edit: Also, the tagged string containing the command starts on the server, gets sent to the client via a parameter in a clientCmd, and then it's used as the main argument for commandToServer.
What I essentially am trying to do is to append a tagged string as a field on an existing string. The reason for a tagged string is because it is a command for use in the commandToServer function.
Let's say I've got the tagged string 'light' stored in variable %tagStr. I then create a longer string like such:
Code: [Select]
"Player's Name" TAB "10200" TAB "1" TAB %tagStr
Now when I output getField(%theStringAbove,3) to the console, it says something like "88 light". Which I think is messing up the function call:
Code: [Select]
commandToServer(getField(%theStringAbove,3),"1");
Now with the light example, this works when hosting my own server. But it doesn't work when a player on my server does the exact same method.
This may have something to do with my client and server being like a melting pot of functions and thus it only works for me. Any ideas though why this wouldn't work for a player in my server?
Edit: Also, the tagged string containing the command starts on the server, gets sent to the client via a parameter in a clientCmd, and then it's used as the main argument for commandToServer.