HoMoReXuaL
2012-07-06 00:29:52
Hello, im trying to make certain procedures only go once they are activated by a key or password. For example you would type "~" into the chatbox and it would then proceed to other methods. My procedure is not working correctly for some reason. This is what i have -
procedure TriggerCheck;
begin
key := false;
counter := 0;
trigger := '~';
textLine := GetBlackChatMessage;
while (counter < length(textLine)) do
begin
counter := counter +1;
if textLine[counter] = trigger then
key := true
else key := false;
end;
end;
Any help on reasons that it isnt working or tips to fix it would be greatly appreciated, Thanks!
procedure TriggerCheck;
begin
key := false;
counter := 0;
trigger := '~';
textLine := GetBlackChatMessage;
while (counter < length(textLine)) do
begin
counter := counter +1;
if textLine[counter] = trigger then
key := true
else key := false;
end;
end;
Any help on reasons that it isnt working or tips to fix it would be greatly appreciated, Thanks!