need some coding help
Posted: Mon Mar 28, 2011 9:37 pm
Ok I just can't work out how I am going to do this bit.
Basically I am setting a bot to follow a party member if the name matches one set in profile. Looks like this atm.
Which works aslong as if their is a name in profile and it matches one of the party member names. Trouble is what if you put in a wrong name or spell it wrong? At the moment it follow no one.
I tried to just add in
but it starts to follow party1 and then if name is right it starts to follow correct party member and does it back and forth non stop.
I guess I need to add a check if it is following after the member names and then if not make it follow party 1.
I am a bit tired so seeing if anyone else has an easy solution that I just can't think of lol
Basically I am setting a bot to follow a party member if the name matches one set in profile. Looks like this atm.
Code: Select all
if ( settings.profile.options.PARTY_FOLLOW_NAME ) then
if GetPartyMemberName(1) == settings.profile.options.PARTY_FOLLOW_NAME then RoMScript("FollowUnit('party1');"); end
if GetPartyMemberName(2) == settings.profile.options.PARTY_FOLLOW_NAME then RoMScript("FollowUnit('party2');"); end
if GetPartyMemberName(3) == settings.profile.options.PARTY_FOLLOW_NAME then RoMScript("FollowUnit('party3');"); end
if GetPartyMemberName(4) == settings.profile.options.PARTY_FOLLOW_NAME then RoMScript("FollowUnit('party4');"); end
if GetPartyMemberName(5) == settings.profile.options.PARTY_FOLLOW_NAME then RoMScript("FollowUnit('party5');"); end
else RoMScript("FollowUnit('party1');");
end
I tried to just add in
Code: Select all
if ( settings.profile.options.PARTY_FOLLOW_NAME ) then
RoMScript("FollowUnit('party1');");
I guess I need to add a check if it is following after the member names and then if not make it follow party 1.
I am a bit tired so seeing if anyone else has an easy solution that I just can't think of lol