Plz Help ME
#1

pawn Код:
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\MyScript.pwn(1364) : error 025: function heading differs from prototype
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\MyScript.pwn(1365) : error 021: symbol already defined: "strtok"
I:\Games\RockStar Game Gta San Andreas\Gta Sanandreas\My Script\gamemodes\MyScript.pwn(1379) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
pawn Код:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
    return 1;
}
stock strtok(const string[], &index,seperator=' ')
{
    new length = strlen(string);
    new offset = index;
    new result[128];
    while((index < length) && (string[index] != seperator) && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    if((index < length) && (string[index] == seperator))
    {
        index++;
    }
    return result;
}
Reply
#2

Delete this as you already have it defined:

pawn Код:
stock strtok(const string[], &index,seperator=' ')
{
    new length = strlen(string);
    new offset = index;
    new result[128];
    while((index < length) && (string[index] != seperator) && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    if((index < length) && (string[index] == seperator))
    {
        index++;
    }
    return result;
}
Reply
#3

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)