11.03.2011, 15:24
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;
}