Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-16-2004, 06:56 PM
Gman4pwnu Gman4pwnu is offline
Banned
Join Date: Jan 2004
Posts: 434
Gman4pwnu is on a distinguished road
Send a message via AIM to Gman4pwnu
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.
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.