Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #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
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:05 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.