Error format..
#2

pawn Код:
sizeof(MisiuneInfo[playerid][mLoadp])
sizeof(MisiuneInfo[playerid][mLoadp])
sizeof(MisiuneInfo[playerid][mUnoadp])
You cannot use sizeof in this case. Use their values instead.

pawn Код:
format(MisiuneInfo[playerid][mLoadp], 70, "%s", LS_CARGO_LoadPoint_Nume[transport_nume_loadp]);
format(MisiuneInfo[playerid][mLoadp], 70, "%s", LS_CARGO_LoadPoint_Nume[transport_nume_loadp]);
format(MisiuneInfo[playerid][mUnoadp], 70, "%s", LS_CARGO_UnLoadPoint_Nume[transport_nume_unloadp]);
But format is slow and it's not the best way of copying strings. Use strcat instead. A useful macro:
pawn Код:
#define strcpy(%0,%1,%2) strcat((%0[0] = '\0', %0), %1, %2)
And it can be used as:
pawn Код:
strcpy(MisiuneInfo[playerid][mLoadp], LS_CARGO_LoadPoint_Nume[transport_nume_loadp], 70);
strcpy(MisiuneInfo[playerid][mLoadp], LS_CARGO_LoadPoint_Nume[transport_nume_loadp], 70);
strcpy(MisiuneInfo[playerid][mUnoadp], LS_CARGO_UnLoadPoint_Nume[transport_nume_unloadp], 70);
Reply


Messages In This Thread
Error format.. - by [RO]Five - 26.12.2013, 11:20
Re: Error format.. - by Konstantinos - 26.12.2013, 11:33
Re: Error format.. - by [RO]Five - 26.12.2013, 11:44
Re: Error format.. - by Konstantinos - 26.12.2013, 11:49
Re: Error format.. - by [RO]Five - 26.12.2013, 12:03

Forum Jump:


Users browsing this thread: 1 Guest(s)