ds_list_insert(id, pos, val);

参数 描述
id 需要添加数据的列表索引值
pos The position to add the value, where 0 corresponds to the very beginning of the list and the final position is ds_list_size(id)-1.
val 需要添加到列表中的值

返回: N/A(无返回值)


This function will add the given value into the list at the given position. if the list contains more values after the given position, their position will be shifted up one to make room making the list larger by one.


ds_list_insert(list, 9, score);

The above code will add the value stored in the variable "score" into the 10th position of the list indexed by the variable "list" (lists are counted from 0, so a ten value list is numbered from 0 - 9).

上一页: DS Lists
下一页: ds_list_replace
© Copyright YoYo Games Ltd. 2018 All Rights Reserved