This is somewhat noobish, but I really can't figure this out.
I created a database entry in the character table that inserts strings into a field. Whenever you start a quest or progress in a quest it adds another string so that I can check for that on the next part of the quest. So, my problem.
For adding strings/checking it would be:
but I realize that running multiple if statements checking for values in this on an npc won't work, as it can only run one if-statement with a certain value and several strings will still be in the database that it has checked for before, so I have to have a way of removing or replacing it.
I tried:
.replace could probably work if i deleted text from a certain index([Only registered and activated users can see links. Click Here To Register...]), but that wont work as people wont do the quests in the same order, so I cant set it to a certain index without it being replaced at some point.
Any ideas? At the moment I can only add strings to it, but not remove.
I created a database entry in the character table that inserts strings into a field. Whenever you start a quest or progress in a quest it adds another string so that I can check for that on the next part of the quest. So, my problem.
For adding strings/checking it would be:
Code:
user.quests += "sss";
if (user.quests.contains("sss")
I tried:
Code:
user.quests -=(which doesn't work for strings), user.quest.remove("sss") // doesnt do anything
user.quest.replace("sss", "aaa") // doesn't do anything either.
Any ideas? At the moment I can only add strings to it, but not remove.