Kosolov325
Recruit
So, i'm trying to loop through an instance and then store a slot on it. the slot will be a number which had been taked from a string, but i have no idea why isn't working.
Since that string will has random numbers and i can't know the exactly digits from it i did by Regex's research.
hopefully someone can help me. my thanks.
Since that string will has random numbers and i can't know the exactly digits from it i did by Regex's research.
Python:
# ("regex", "/(\d+)/"),
# ("regex_string", "A"),
# {s2} = will be like this A55A44A0A501A120A0A0A0A
(try_for_range, ":inventory_slot", slot_scene_prop_inventory_begin, ":inventory_end"),
(str_clear, s3),
(str_regex_get_matches, ":amount", s3, s2, "str_regex"), #search for the first digits on s2 and then store inside s3
(server_add_message_to_log, s3),
(str_to_num, ":item_id", s3),
(scene_prop_set_slot, ":instance_id", ":inventory_slot", ":item_id"),
(str_clear, s0),
(str_store_regex_replace, s0, s2, "str_regex", "str_regex_string"), #search for the digit that had found peviously and then store the letter A on the place, so the next loop will take the next number from the string {s2}
(str_clear, s2),
(str_store_string, s2, s0),
(server_add_message_to_log, s2),
(val_sub, ":amount", ":amount"),
(try_end),
hopefully someone can help me. my thanks.
Last edited: