![]() |
STRCMPI & VAR - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: Script Help (/Forum-Script-Help) +--- Thread: STRCMPI & VAR (/Thread-STRCMPI-VAR) |
STRCMPI & VAR - pinku - 11-07-2013 06:04 PM Long story short, Created a thread for something else, now I can't get something else to work: Code: IF ((<SRC.TAG.MYTAG> == 01) && (<EVAL <SRC.TAG.MYTAG2>> > <VAR.RECORD1>)) So, to set a new second record, you must NOT be Recorder1 and have more points than RECORD2. Then... Code: ELSEIF ((<SRC.TAG.MYTAG> == 01) && (<EVAL <SRC.TAG.MYTAG2>> > <VAR.RECORD2>) && !(STRCMPI("<SRC.NAME>","<EVAL <VAR.RECORDER1>>")) Code: Error: Undefined symbol 'Name' If I don't EVAL the VAR, a higher pointer can take all records.. Record1, Record2, Record3... In the end, STRCMPI doesn't seem to work in this case... Any suggestions on how I can compare the character name to a stored name in a VAR? Even though I have the MYTAG2 higher than the RECORD2, it doesn't seem to work... Suggestions? Edit: Also tried Code: ELSEIF ((<SRC.TAG.MYTAG> == 01) && (<EVAL <SRC.TAG.MYTAG2>> > <VAR.RECORD2>) && (!STRMATCH("<SRC.NAME>","<EVAL <VAR.RECORDER1>>")) Same error: Code: Error: Undefined symbol 'Name' _____________ PS: This is an older method I was using, but I am curious.. Trying to make it work anyway. I am now -trying- to use the list method RanXerox told me. ![]() Thanks everyone. RE: STRCMPI & VAR - Alaric - 11-07-2013 09:00 PM First suggestion - store uids, turing an uid into name is easier than name into uid... Second - STRMATCH(<src.name>,<uid.<var.recorder1>.name>) if uid stored or STRMATCH(<src.name>,<var.recorder1>). RE: STRCMPI & VAR - pinku - 11-07-2013 10:54 PM <uid.<var.recorder1>.name> worked just fine for me. Much better now. Thank you very much, Alaric! RE: STRCMPI & VAR - Mordaunt - 11-07-2013 11:13 PM also note of point.... strmatch and strcmpi are for strings, eval is for integers, so an eval in a strcmpi or strmatch arguement is not valid |