String Capture

Unofficial support for the creating and editing of metas.
Singlar
Posts: 6

String Capture

Post #1 »

Out of curiosity is this possible?

I mean, I know with expressions it is now technically possible using regular expressions matching each letter in the string and setting a variable for it, but is there a more practical solution?

yaroz
Moderator
Posts: 129

Post #2 »

This is one of the options that I asked Virindi for as well.

User avatar
Sif al Taak
Posts: 19

Post #3 »

Are we able to initialise are varaiable with a string value like:

Code: Select all

setvar[player1, Sif al Taak]
I know i will get: [VTank] Error in meta expression action: setvar[player1,Sif al Taak] (Operand without intervening operator: "setvar[player1,Sif al Taak]")

Code: Select all

setvar[player,getcharstringprop[1]]
is working and i get the Player name and i could compare with

Code: Select all

istrue[getvar[player]==Sif al Taak]==1
But i want to initalise vars with the names of players of a fellowship, which are allowed to control the shared commands for multi boxing

Static it works like

Code: Select all

^(\[Fellowship\] |)(\<Tell:IIDString:.+:(Sif al Taak|Ziv al Taak|Elm|Sin'sa)\>.+\<\\Tell\> (says|tells you)|You say), \"!r\"$
But i want to initalise vars with the names, so i dont need the whole static char name stuff in each command check....

User avatar
HellsWrath
Site Admin
Posts: 389

Post #4 »

You are trying to name your variable with both a string and an integer as [player1]
You need to escape the 1 to make it part of the string [player\1, Sif al Taak]

User avatar
Sif al Taak
Posts: 19

Post #5 »

Thx, HW, thats what im looking for...