Quote:
Originally posted by aesquivel
Could some one fix this plz
NPC Code:
if (playerenters) {
if(lindexof(#a,list) != -1) {
setlevel2 onlinestartlocal.graal,30,30;
}
}
if (playerchats) {
if (startswith(Add,??) {
setstring this.stringname,account1,account2,account3,ect;
}
}
|
I will not hand you the solution on a silver platter but here is your problems:
1.
NPC Code:
if(lindexof(#a,list) != -1) {
and list is your list? I think not. You need to specify your list as this.stringname
please don't take things THIS literally. Copy-paste doesn't work when we are just explaining the commands, not giving you a script. Our examples are suppliments to the informations in commands.rtf. Please get scripting background before asking advanced questions.
2.
NPC Code:
if (startswith(Add,??) {
Hate to break it to you but "??" will never start with "Add", not even if you think happy thoughts and get pixie dust.
3.
NPC Code:
setstring this.stringname,account1,account2,account3,ect;
again, copy paste isn't what we want you to do. Figure out the commands. we are litterally saying
setstring THE_STRING_NAME_YOU_WANT_PLEASE_PUT_HERE,ACCOUNT #1,ETC.
you must interperate that as "Oh. maybe i should substitute this literal things with acual code... so
setstring this.accounts,aesquivel,Falcor,Stefan,Man_from_mar s;
or whatever the accounts you want to be in the string.