stock error to save file !
#1

this is my code ... using y_ini , but the result errors ...
Код:
stock SetPlayerTitle(playerid,title)
{
	new ttl[128];
	format(ttl,sizeof(ttl),"%s",title);
        pInfo[playerid][Title]=ttl; // line 320
	return 1;
}
and ERRORS
Код:
C:\Users\ICE\filterscripts\cmds.pwn(320) : error 047: array sizes do not match, or destination array is too small
Reply
#2

Try this:
pawn Код:
stock SetPlayerTitle(playerid,title[128])
{
        format(pInfo[playerid][Title], 128, title);
    return 1;
}
Reply
#3

not working !
Reply
#4

in enum where Title is written it whould be like this
pawn Код:
enum ENUMNAME
{
//your enums here
Title[128],
//rest of enums
}
Reply
#5

Quote:
Originally Posted by [HLF]Southclaw
Посмотреть сообщение
This method is faster than format:

pawn Код:
pInfo[playerid][Title][0] = EOS; // set the first cell to "end-of-string" so the strcat function adds the string at the start.
strcat(pInfo[playerid][Title], title); // concatenate the input string to the array cell.
It has nothing to do with the post but thanks Southclaw! Needed a faster formatting code!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)