[Include] Linked list implementation in PAWN
#4

Thanks, now I got it. So I give it a try and got some code from documentation at github, there are some errors, not big, but if you want to know.

Код:
new List:list, value[16], m_v_sz, v_sz;
LIST_push_back_str(map, "This is a test);
LIST_push_back_str(map, "foo");
LIST_push_back_str(map, "bar");
LIST_foreach(v : list)
{
	v_sz = MEM_get_size(v);
	m_v_sz = ((v_sz < sizeof value) ? v_sz : sizeof value);
	MEM_zero(UnmanagedPointer:MEM_get_addr(value[0]), sizeof value);
	MEM_get_arr(v, _, value, m_v_sz);
	printf("0x%x, %d, \"%s\"", _:v, v_sz, value);
}
This is at LIST_foreach.

Код:
error 017: undefined symbol "map"
Код:
new List:list, value[16], m_v_sz, v_sz;
LIST_push_back_str(map, "This is a test); //also there is a lack of " near test
But I wanted to ask about this line, gives error

Код:
MEM_zero(UnmanagedPointer:MEM_get_addr(value[0]), sizeof value);
Код:
error 017: undefined symbol "MEM_get_addr"
I checked file memory.inc and there is lack of this function, but I commented this line and everything seems to be working as expected, is this line necessary?
Reply


Messages In This Thread
Linked list implementation in PAWN - by BigETI - 22.11.2017, 10:27
Re: Linked list implementation in PAWN - by ball - 03.05.2018, 12:15
Re: Linked list implementation in PAWN - by BigETI - 03.05.2018, 13:37
Re: Linked list implementation in PAWN - by ball - 03.05.2018, 14:18
Re: Linked list implementation in PAWN - by BigETI - 03.05.2018, 15:16
Re: Linked list implementation in PAWN - by ball - 03.05.2018, 17:30
Re: Linked list implementation in PAWN - by BigETI - 03.05.2018, 17:42

Forum Jump:


Users browsing this thread: 1 Guest(s)