ID:263753
 
Code:
                                                            for(var/A in D.actionp1c1)
if(filmfix==0)
filmfix=1
if(A!="|end|")
A-="|"
A-="|"
src.BattleChoice=A
src.NPCCombat()
D.actionp1c1-=A
D.actionp1c1-="|end|"


Problem description:

In theory, this should work. However, ingame, BYOND Spits an error at me and it doesn't work. It compiles just fine.

Any idea?
Mista-mage123 wrote:
In theory, this should work.

Well no, typically a theory has to be based on something to have any sort of validity. There's nothing in the DM guide or reference that would suggest what you're trying would work.

You need to be using findText() and copytext() instead.

Lummox JR
In response to Lummox JR
I checked the DM Guide.
I already knew about find text and such, but I have no idea, even with DM Guide, about how to REMOVE the |'s once they've been found.

Copytext doesn't work because you need to know when to start and when to end, and the A can be any length.
In response to Mista-mage123
...which is exactly why you use findtext().
In response to Popisfizzy
Search for the text handling libraries and that should solve your problem.