Jump to content

tinpont

Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Gender
    Male

Recent Profile Visitors

296 profile views

tinpont's Achievements

Poring

Poring (1/15)

0

Reputation

  1. Yeah, array is better than string. Thank you for your help. Great, a new way to deal with dynamic array. Thank you, Emistry.
  2. this is the thing that I'd like to say since last night. sure, np! //off topic shouldn't it be GLHF? (Good Luck Have Fun)? Yeah, programming is fun. Thank you. But I just found out a bug, if last element of array is 0, getarraysize will not corrected. setarray .headgear[0],2237,1020,100,983,1,2241,1,0; debugmes getarraysize(getd(".headgear")); // output 7 But it's not a big deal.
  3. Hey, Winz, Thank you for your reply. As you can see, the array size of .headgear{i}_{j} is dynamic(not confirm). How can I get the array size? Use while(.headgear{i}_{j}[k]) or something to calculate? I think I should read some source code first. Thanks. Final I found out how to get array size dynamic. .@count = getarraysize(getd(".HLGFHeadgear" + .@i + "_" + .@j)); I think .@var is a pointer before, but I realize it is a copy pointer with it's own structure (int). So this is why I always get array size equal 1. And getd actually return array's pointer, so it could read size easily. Thank you Winz.
  4. code first. setarray .headgear0_0[0],5210,2254,10,7063,50,7168,200,7038,200,10000000; setarray .headgear0_1[0],5254,5132,1,5068,1,2255,1,7023,5,983,1,10000000; .@i = 0; .@j = 1; .@headgear = getd(".headgear" + .@i + "_" + .@j); debugmes getarraysize(.@headgear); // output 1 debugmes .@headgear; // output 5254 I want to get the entire array from dynamic string, but the result not my expect. I already read document here: http://rathena.org/wiki/Variables#Simulating_Multidimensional_Arrays , but not telling me how to get entire array dynamic. Am I missing something or my way is wrong ? Sorry for my poor English....
×
×
  • Create New...