Brian_Provinciano |
As it turns out, the AGI Studio compiler and help file handle the word.to.string command incorrectly. The help file states: "word.to.string(wA,sB); -- This command is supposed to convert a word to a string, but I have not been able to get it to work." Well, it does indeed work. What it does is retreive a word from the player input (a words.tok word), and place it in a string. However, it's actually "word.to.string(sA, B)". The sA is the destination string, and the B is an immediate number for the word number starting at 0. For example, if the player enters "look at door", the interpreter parses it as "look door", and "look" would be word 0, "door" would be word 1. code example: if(isset(f2)) { word.to.string(w5,s1); print("WORD #1: %s5"); } Put that in your logic.0 or whatnot, and see it in action. Note that the correct form would be "word.to.string(s5,1);", but the compiler incorrectly parses the arguments. |
Kon-Tiki | Didn't even know of that command ::) That thing opens up a whole new horizon of user-involvance. Pretty nifty that you set out how it should be used too, otherwise there would be some problems with it sooner or later. |
sonneveld |
ooh i got spare time now.. i should fix all this.. i'm like halfway through updating docs / compiler / studio and i sorta put it off cause of uni at the moment. It's always fun when i read stuff like "don't know how this works" and I just have to go to NAGI's source to find out exactly. - Nick |
AGI1122 | I will update the help file to reflect this. |