new string stops script
#1

Alright I am haveing a problem createing a string this is the strangest thing in pawn I have every encountered.
The stop at the red mark

Код:
stock GetStringForPage(index,dialogid)
{
	printf("pass7a:%i",index);//remove
	new text[256];
	printf("pass7b%i",index);//remove
	if((dialogid)==0)
	{
		printf("pass7c%i",index);//remove
		format(text,sizeof(text),"Crap:%i",index);
		printf("pass7d:%i",index);//remove
	}
	else
	{
		print("Not here");
	}
	printf("pass7e:%i",index);//remove
	return text;
}
Output
Код:
[13:43:58] pass1
[13:43:58] pass2
[13:43:58] pass3
[13:43:58] pass4:0
[13:43:58] pass5:0
[13:43:58] pass6:0
[13:43:58] pass7:0
[13:43:58] pass7a:0
Thank you ****** for helping me solve the issue

Entire script
You can download the compleate version here https://sampforum.blast.hk/showthread.php?tid=534903
Reply
#2

Try changing "new text[256];" to something else like new text2 since "text" is a variable defined for text-draws I believe
Reply
#3

I have already tried that
Reply
#4

looks like I do
Код:
Header size:           3724 bytes
Code size:            93580 bytes
Data size:         16872672 bytes
Stack/heap size:      16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements:16986360 bytes
Reply
#5

Alright thank you
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)