Page 1 of 1
String Capture
Posted: January 15th, 2015, 8:08 pm
by Singlar
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?
Re: String Capture
Posted: January 15th, 2015, 8:14 pm
by yaroz
This is one of the options that I asked Virindi for as well.
Re: String Capture
Posted: January 16th, 2015, 5:04 pm
by Sif al Taak
Are we able to initialise are varaiable with a string value like:
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....
Re: String Capture
Posted: January 16th, 2015, 7:26 pm
by HellsWrath
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]
Re: String Capture
Posted: January 16th, 2015, 7:49 pm
by Sif al Taak
Thx, HW, thats what im looking for...