![]() |
Chrisz: Storing a hell of a lot of info....
Chrisz: How can i store LOADS of info in a string.... like
client.boxes="box1" "box7" and then.... arf make it so i can select what box i have? and no im not asking for scripts just i havent ever done anything liek this..... :confused: |
=o Idea....
i could set each one as.... set hasbox1! :D
buuuut.... How would i access em all?? Without doing a HUGE EEK script.... if (hasbox#v(this.box)) Obviously that dont work.... any ways around it? :X |
String arrays and for loops are what you seek.
String arrays are basically string which can contain multiple parts of informatoin in an easily accesible way, string arrays should be explained in newfeatures.txt somewhere (Which should be in your Graal folder), and a for loop is basically for (before loop action;condition to stop performing;End of loop action), or to make an example of cade which works the same as the for loop: NPC Code: Is actually equal to: NPC Code: With a for loop in combination with a string you can also make use of the sarraylen(sarrayname) function to make the for loop exactly check all entries in the string array. I hope that helps. :) |
O.o String arry = non-p2p?
I have heard of loops (duh) but string arrays?? i heard of lists too but still string arrays? :O Can u explain or will i have to ponder....
|
Re: O.o String arry = non-p2p?
Quote:
Quote:
|
lmao
O.o im retarded lol i know what they are now..... i never knew they were called string arrays O.o X.x But that dont explain how i should make the damn npc look....
if (keydown(1) && this.box>0) { this.box-=1; tokenize client.boxs; while (!strcontains(#t(this.box),box#v(this.box))) { this.box-=1; } } See O.o so i can make like a selector like if you dont have a box it misses it out.... =? |
Re: lmao
Quote:
use this: addstring list, string; and to access a string in the string array use: #I(list, index); |
tokenize2 ,,#s(this.boxes);
this.foundbox=false; for (i=0;i<tokenscount;i++;){ if (strequals(#t(i),wat ur trying to find here)){ this.foundbox=true; } } if (this.foundbox==true){ say2 you found me loser; }else say2 you didnt fine me lol; |
| All times are GMT +2. The time now is 04:31 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.