message not showing up!! help - 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: message not showing up!! help (
/showthread.php?tid=484967)
message not showing up!! help -
yuvraj201 - 02.01.2014
It compiles good but ingame no message come on screen what is wrong?
pawn Код:
CMD:mycars(playerid, params[])
{
new string[1000000];
format(string, sizeof(string), "Car 1: %d & Car 2 %d", pInfo[playerid][pCar], pInfo[playerid][pCarr]);
SendClientMessageEx(playerid, COL_GREEN, string);
return 1;
}
Re: message not showing up!! help -
Wizza - 02.01.2014
Whyyyyyyyyyyyyyyyyyyyy would you use 1000000 string arrays just to send the player a message, use smaller arrays like 32-50.
Re: message not showing up!! help -
Lidor124 - 02.01.2014
new string[100000000] ? LOL
use string[128];
Re: message not showing up!! help -
Wizza - 02.01.2014
Quote:
Originally Posted by Lidor124
new string[100000000] ? LOL
use string[128];
|
Thats still to many arrays that message wont even support 50 why would you give it 128 lol
Re: message not showing up!! help -
Henkie - 02.01.2014
That string is over 9000!

Change it to 128 and it will probably work :')
Re: message not showing up!! help -
dominik523 - 02.01.2014
Quote:
Originally Posted by yuvraj201
It compiles good but ingame no message come on screen what is wrong?
pawn Код:
CMD:mycars(playerid, params[]) { new string[1000000]; format(string, sizeof(string), "Car 1: %d & Car 2 %d", pInfo[playerid][pCar], pInfo[playerid][pCarr]); SendClientMessageEx(playerid, COL_GREEN, string); return 1; }
|
Dude, do not make new strings with size like that. Make something smaller like 128 characters, in your case 64 would be also good.
Re: message not showing up!! help -
Konstantinos - 02.01.2014
Using size 4077+ for arrays will make a runtime error 3: "Stack/heap collision (insufficient stack size)".
Neither 128 because it's waste when it's not even 32 characters (less).
pawn Код:
CMD:mycars(playerid, params[])
{
new string[25];
format(string, sizeof(string), "Car 1: %d & Car 2 %d", pInfo[playerid][pCar], pInfo[playerid][pCarr]);
SendClientMessageEx(playerid, COL_GREEN, string);
return 1;
}