| Blockland Forums > Modification Help |
| CommandToServer(); causes game to crash |
| << < (2/3) > >> |
| Chrono:
Because commandtoserver("Self Delete"); which you had down, is wrong. Where commandtoserver('Self Delete'); is right, which Kalphiter had down. In order to get a variable in there, eval("commandToServer('" @ $GlovalVariable @ "');"); |
| Nexus:
--- Quote from: Chrono on June 04, 2011, 04:29:37 PM ---Because commandtoserver("Self Delete"); which you had down, is wrong. Where commandtoserver('Self Delete'); is right, which Kalphiter had down. In order to get a variable in there, eval("commandToServer('" @ $GlovalVariable @ "');"); --- End quote --- I had both down, Kalphiter didn't read. I know what is right and what is wrong, I just didn't know how to convert between tags. Thanks for your solution, testing to see if this works. I'll leave this unlocked for a bit to see if anyone knows the name of a function to convert the tags on the strings. |
| Nexus:
Ok, chrono's way works, but for some reason doing "'"@$variable@"'" does not. It only works when the function is inside an eval. |
| Destiny/Zack0Wack0:
commandToServer(addTaggedString($variable)); |
| Chrono:
--- Quote from: Nexus on June 04, 2011, 05:15:36 PM ---Ok, chrono's way works, but for some reason doing "'"@$variable@"'" does not. It only works when the function is inside an eval. --- End quote --- Because doing it that way makes it a string with 's in it, rather than a tagged string. But use Zack's method instead. |
| Navigation |
| Message Index |
| Next page |
| Previous page |