Dark Age Games
Home Dark Age EX Dark Age 2 Message Board Fan Art FAQ Kelzar Mage DALpedia MS Forum
Board Index Dark Age General Bug Report Website Off Topic Register User Edit User User List Search

In reply to: Thanks -- Tidus 21:03:37 08-23-2004

Hmmm...
Posted by: Xorlak
11:46:40 08-24-2004

One way to do that would be to store the old combo$ before you add something.  For example:

#oldcombo$=combo$
#combo$=combo$+a$


Then when you want to subtract the last one:

#combo$=oldcombo$

But that will only allow you to back up once.

Hmmm, now that I think of it, a$ is only one letter, right?  You could take apart the varaible with #CharAt and reconstruct it without the last letter.  For example, when adding:

#combo$=combo$+a$
#combolength!=combolength!+1


Now when taking the last letter off:

#newcombo$=""
#for(i!=1;i!<combolength!;i!=i!+1)
{
  #charat(combo$,i!,a$) *puts the letter in position i! into a$
  #newcombo$=newcombo$+a$
}
#combo$=newcombo$


That'll copy everything before the last letter into newcombo$, which then replaces what's in combo$.

----------
-Xorlak
Edit Post