The forums will be going offline for an extended maintenance period at 1400hrs GMT on 19th June 2025. The number of hours for this downtime is intentionally not advertised due to the nature of these upgrades.
×
- 0
Deleting char_id on an array
-
Recently Browsing 0 members
- No registered users viewing this page.
Question
pajodex
Hi,
So I tested out a lot of things but this part seemed to be not working.
for(.@i=0; .@i < .@size; .@i++) { if (.char_id[.@i] == getcharid(0)) cleararray .char_id[.@i],0,getcharid(0); }
This supposed to delete char_id to the array.
Is there an alternative where I can retrieve the char_id list so I can remove the specific char_id listed? To explain futher:
array .char_id: .char_id[0] = 150001 .char_id[1] = 150002 .char_id[2] = 150003 .char_id[3] = 150004 I want to remove .char_id[2] from the list. using: deletearray .char_id[2],1; so results will be: .char_id[0] = 150001 .char_id[1] = 150002 .char_id[2] = 150004
I also tried this:
for(.@i=0; .@i < .@size; .@i++) { if (.char_id[.@i] == getcharid(0)) deletearray .char_id[.@i],1; }
but I figured that .@i is not = 2... I know you get what I mean xD
Thanks for anybody interested in helping.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.