Error Assigned to an array
#4

First, don't use sscanf if you have only one string..thats nonsense

Ok, write it like this:

PHP код:
CMD:addino1(playeridparams[])
{
    if(
IsNull(params)) return SendMessage(playerid0xFFFF00FF"Usage: /addinfo1 [Information about another player].");
    if(
strlen(params) > 11) return SendMessage(playerid0xFFFF00FF,"* Too long information!");
    new 
string[128];
    
format(stringsizeof(string), "You have add: [%s] at line Info 1 of your phone."params);
    
SendClientMessageEx(playeridCOLOR_REPORTstring);
    
format(PlayerInfo[playerid][pNoidungdanhbas],11,params);

Maybe you should set the maxlen not to 11..32 or sth like this..should be better about information

Just chance these 11 to 32 in the code, it all should worked fine
Reply


Messages In This Thread
Error Assigned to an array - by SamBum - 19.09.2016, 16:12
Re: Error Assigned to an array - by Kaliber - 19.09.2016, 16:14
Re: Error Assigned to an array - by SamBum - 19.09.2016, 16:47
Re: Error Assigned to an array - by Kaliber - 19.09.2016, 16:54
Re: Error Assigned to an array - by SamBum - 19.09.2016, 17:14
Re: Error Assigned to an array - by Kaliber - 19.09.2016, 17:56
Re: Error Assigned to an array - by SamBum - 20.09.2016, 03:34

Forum Jump:


Users browsing this thread: 2 Guest(s)