The Daily Click ::. Forums ::. Klik Coding Help ::. MMF2 Knownc string parser problems?
 

Post Reply  Post Oekaki 
 

Posted By Message

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
18th June, 2010 at 19:15:47 -

I am using the string parser to create RPG-Like text.

The strings are stored in the character that you are speaking to. It works fine with one character, but if I add another things get out of whack.

I have checked my code about 15 times and everything checks out. The reason that I know it is a string parser problem is because of this:

If I create a second object and give it the alterable strings "1" "2" "3" "4" "END"

It will display some strings from itself and some strings from the other completely separate object. Now heres the trippy part.

If I delete the second object , save, then talk to the original object. It now displays some of its original strings, then it will continue to display "1" "2" "3" etc. even though those strings no longer exist in the game!

Anyone had any similar problems?

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
18th June, 2010 at 22:20:51 -

I didn't really understand any of that, but I've never had any problems with the String Parser 2 extension and I use it quite a lot.

When you say "RPG-like text", are you talking about displaying a paragraph one character at a time, because that wouldn't require an extension - you can just use left$.
If you're using it for tokenizing, then there are at least two other extensions you could try instead.

Also, when you say it goes wrong with multiple characters, are they duplicates of the same object? If so, are you absolutely certain there isn't a problem with the wrong object being selected?
Can you show us a file?

 
n/a

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
19th June, 2010 at 01:13:45 -

Hey Sketchy, thanks for the reply.

Theres no duplicates and I'm positive its not the wrong object being selected.

The left$ function is what I needed, thanks a TON for telling me that. I'll go implement that now .

If you would like I can go ahead and throw up an example, but I don't believe that it is needed now.

By the way. Is there a function for retrieving the length of a string as well with no extensions?

Nevermind. It was LEN.


Edited by GamesterXIII

 
n/a

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
19th June, 2010 at 02:07:12 -

My string object is not wrapping so long text just disappears.

I feel stupid asking this, but Is there an easy way to make it wrap?

Nevermind again. The text wasn't wrapping because there were no spaces.

Edited by GamesterXIII

 
n/a
   

Post Reply



 



Advertisement

Worth A Click