new string stops script - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: new string stops script (
/showthread.php?tid=534850)
new string stops script[Solved] -
horsemeat - 31.08.2014
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
Re: new string stops script -
Sledgehammer - 31.08.2014
Try changing "new text[256];" to something else like new text2 since "text" is a variable defined for text-draws I believe
Re: new string stops script -
horsemeat - 31.08.2014
I have already tried that
Re: new string stops script -
horsemeat - 31.08.2014
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
Re: new string stops script -
horsemeat - 31.08.2014
Alright thank you