Problem with a string value.
#1

pawn Код:
new CRaceName[128];

COMMAND:loadrace(playerid, params[])
{
    new file_name[128], str[256];
    if(RaceAdmin == 1 && GetPVarInt(playerid, "admin_level") < 2)
        return SendClientMessage(playerid, red, "Error: You are not authorized to use this command.");
    Racemode = 0; Racelaps = 1;
    if(sscanf(params, "s[128]", file_name))
        return SendClientMessage(playerid, yaris, "Usage: /loadrace [race name]");
    if(LoadRace(file_name) == 0)
        return SendClientMessage(playerid, red ,"- Race - Race file couldn't find.");
   
    LoadRace(file_name);
    format(CRaceName, sizeof(CRaceName), "%s", file_name);
    format(str, sizeof(str), "- Race - Race %s is loaded.", CRaceName);
    SendClientMessage(playerid, yaris, str);
}
The problem is when I echo out CRaceName value, it shows nothing. But file_name value works properly. Please help me.
Reply


Messages In This Thread
Problem with a string value. - by Emre__ - 26.07.2012, 11:50
Re: Problem with a string value. - by Babul - 26.07.2012, 12:07
Re: Problem with a string value. - by Emre__ - 26.07.2012, 12:29
Fixxx - by arman'as - 26.07.2012, 12:44
Re: Fixxx - by Emre__ - 26.07.2012, 12:48

Forum Jump:


Users browsing this thread: 1 Guest(s)