
04-16-2004, 06:56 PM
|
|
Banned
|
Join Date: Jan 2004
Posts: 434
|
|
Something really helpful with string lists i discovered last night
|
I thought I would post this so people of my scripting skill level might use this. I was working on my housing system, and I didn't want to store a variable in the housing database showing how many users are on the list, so it knows how many times to loop.
So heres what I did:
I took my string list and stored it in this.houseowners using setstring thiso.houseowners within the getnpc. I then tokenized the string list, and I could loop through it with tokenscount.
I hope others can find this as useful as I did. As its helpful with bans from certain levels, housing systems, lottery systems.
Proof that you do learn more efficient ways to do things as you script. Otherwise id still be setting a variable to store how many items are in the string list. |
|
|
|