Author Topic: AGI's word.to.string()  (Read 1992 times)

0 Members and 1 Guest are viewing this topic.

Offline Brian Provinciano

AGI's word.to.string()
« on: September 22, 2003, 03:48:48 AM »
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

  • Guest
Re:AGI's word.to.string()
« Reply #1 on: September 22, 2003, 06:05:27 AM »
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.

Offline Nick Sonneveld

Re:AGI's word.to.string()
« Reply #2 on: September 22, 2003, 06:22:54 AM »
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
Nick Sonneveld  |  AGI Dev  |  NAGI

Offline Chris Cromer

Re:AGI's word.to.string()
« Reply #3 on: September 22, 2003, 05:03:56 PM »
I will update the help file to reflect this.
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.051 seconds with 21 queries.