Problem with server message
#1

i have problem.

i got problem when updated sscanf2.

when use cmd /rac for respawn all cars, server send only two messages:
Код:
	    SendClientMessageToAll(-1, ""COL_RED"[SERVER]: "COL_GREY"Ukoliko ne zelite da se vase aute respawna, budite u vasem vozilu.");
	    SendClientMessage(playerid, COLOR_GREY, ""COL_ORANGE"[SERVER]: "COL_WHITE"Pokrenuo si respawn nekoristenih vozila.");
but this messages dont send:

Код:
	    format(pstring, sizeof(pstring),""COL_ORANGE"[SERVER]: "COL_WHITE"Admin "COL_ORANGE"%s "COL_WHITE"je pokrenuo respawn vozila, sva nekoristena vozila ce se respawnati za 20 sekundi.", sendername);
	    SendClientMessageToAll(COLOR_RED,pstring);
Код:
CMD:rac(playerid, params[])
{

    if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid, COLOR_RED, "[GRESKA]: "COL_WHITE"Nemas prava za koristenje ove komande.");

    else
	{
	    new pstring[248], sendername[MAX_PLAYER_NAME];
	    GetPlayerName(playerid, sendername, sizeof(sendername));

	    format(pstring, sizeof(pstring),""COL_ORANGE"[SERVER]: "COL_WHITE"Admin "COL_ORANGE"%s "COL_WHITE"je pokrenuo respawn vozila, sva nekoristena vozila ce se respawnati za 20 sekundi.", sendername);
	    SendClientMessageToAll(COLOR_RED,pstring);

	    SendClientMessageToAll(-1, ""COL_RED"[SERVER]: "COL_GREY"Ukoliko ne zelite da se vase aute respawna, budite u vasem vozilu.");
	    SendClientMessage(playerid, COLOR_GREY, ""COL_ORANGE"[SERVER]: "COL_WHITE"Pokrenuo si respawn nekoristenih vozila.");
	    SetTimer("RACtime", 20000, 0);
	}
	return 1;
}
Reply
#2

BUMP
Reply
#3

Change this
new pstring[248]
To
new pstring[128]
Reply
#4

You must reach up it from [248] to [5300] example.
Reply
#5

Try this:
pawn Код:
pstring[128+MAX_PLAYER_NAME]
Reply
#6

The message is too much long.. As the wiki says here:

Quote:

If a message is longer than 144 characters, it will not be sent. Truncation can be used to prevent this. Displaying a message on multiple lines will also solve this issue.

Reply
#7

Quote:
Originally Posted by Luis-
Посмотреть сообщение
Try this:
pawn Код:
pstring[128+MAX_PLAYER_NAME]
i will try now.




Quote:
Originally Posted by 1fret
Посмотреть сообщение
Change this
new pstring[248]
To
new pstring[128]
not working

Quote:
Originally Posted by ReshiramZekrom
Посмотреть сообщение
The message is too much long.. As the wiki says here:
but before is working.

and other 10 cmds not working full, but before are working.
Reply
#8

If my method doesn't work just keep trying to increase the string.
Reply
#9

Quote:
Originally Posted by Luis-
Посмотреть сообщение
If my method doesn't work just keep trying to increase the string.
Код:
error 017: undefined symbol "string"
 warning 215: expression has no effect
 error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
 fatal error 107: too many error messages on one line
EDIT: FIXED ,i forgot NEW
Reply
#10

Just cut the string only for trying, it isn't a problem of arrays..
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)