29.12.2013, 01:44
Hey Guys,
I am making a Dialog MDC System and it works fine without having it get a string from a stock.
Can someone please let me know what is happening.
The line using the stock is:
And here is the stock:
And pCharges is like pCharges[6] under the PlayerInfo.
And I try to add pCharges[6][128] but it returns error 001: expected token: "}", but found "["
I am making a Dialog MDC System and it works fine without having it get a string from a stock.
Can someone please let me know what is happening.
The line using the stock is:
pawn Код:
format(string, sizeof(string), "Name: %s, Age: 21, Current Charges: %s", inputtext, GetCharges(i));
pawn Код:
stock GetCharges(playerid)
{
new string[256];
for(new i = 0; i < 7; i++)
{
if(!isempty(g_PlayerInfo[playerid][pCharges][i]))
{
format(string, sizeof(string), "Charge %d: %s\n", i, g_PlayerInfo[playerid][pCharges][i]);
}
else if(isempty(g_PlayerInfo[playerid][pCharges][i]))
{
format(string, sizeof(string), "No Charge\n", i, g_PlayerInfo[playerid][pCharges][i]);
}
}
return string;
}
And I try to add pCharges[6][128] but it returns error 001: expected token: "}", but found "["