Detaljan opis problema: Pa napravio sam komandu /pomoc i uradio sam kada posaljem /pomoc da pise da je pomoc poslana adminima online.... i da pokaze rezultat sta sam poslo, ali tu kod rezultata mi izbaci warning i u igri mi crasha.... Imam warnin a pise da nepase definiciji...
Dio skripte:
if(strcmp(cmd, "/pomoc", true) == 0)
{
if(IsPlayerConnected(playerid))
{
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext <= ' '))
{
idx++;
}
new offset = idx;
new result;
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext;
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "Koristite: /pomoc ");
return 1;
}
format(string, sizeof(string), " |{FFFFFF}%d{FFB200}| %s: %s", playerid, sendername, (result));
ABroadCast(COLOR_ORANGE,string,1);
SendClientMessage(playerid, COLOR_ORANGE, "Vasa /pomoc je poslana svim Adminima/GameMasterima online.");
SendClientMessage(playerid, COLOR_FINEYELLOW, "Vas upit za pomoc glasi: {FFFFFF} %s", (result));
}
return 1;
}A evo warning koji izbacuje:
D:\Balkan Expres Roleplay\gamemodes\BE.pwn(17203) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
1 Warning.
Ako neko zna nek pomogne, hvala unapred :/
Neke slike/video za lakse dobivanje pomoci(neobavezno): //
