Thread: #e
View Single Post
  #1  
Old 05-17-2001, 09:46 PM
_Shoey_Fighter_ _Shoey_Fighter_ is offline
Registered User
Join Date: Mar 2001
Location: Salem, OR, US
Posts: 45
_Shoey_Fighter_ is on a distinguished road
Send a message via ICQ to _Shoey_Fighter_ Send a message via AIM to _Shoey_Fighter_
#e

OK, here is what I want to do. Let's say I have a string that looks like this: "test test1 test2 test3", and can be added to simply by chatting (so basically it is a dynamic string). Because I can add to it, I would also like to remove. I know that #e is what I should do for it, but I am having trouble with it. Here is what I have so far:

//#t(1) in this case is equal to the string that wants to be extracted
setstring this.temp,#t(1);
//this is where we have "test test1 etc"
tokenize mystring;
this.fine=0;
this.temp2=0;
/*this for loops supposed to add a strings length+1(for spaces) to this.temp2 until it gets to the string that wants to be removed, where it stops adding. But, it no worky.*/
for(i=0;i<tokenscount;i++){
if(strcontains(this.temp,#t(i))){this.fine=1}
if(this.fine==0){this.temp2+=1+strlen(#t(i));}
}
//this actually set the string at the end
setstring mystring,#e(this.temp2,strlen(#s(this.temp)),#s(se rver.playerhouse1allowed));


Probably pretty confusing to look at, but I thought I might as well ask
__________________
www.mooglecave.com - Console RPG Site
http://sdragons.mooglecave.com - Graal Scripting Page
Reply With Quote