12.02.2015, 12:31
Hello
I have the following errors
Error lines
When I tried to remove that stocks, the compile worked but when I joined in race (Because it is a part from Ryder's race system) I spawned in the air without a car but in correct position/place
+REP to everyone who will help me
I have the following errors
pawn Код:
(13239) : error 021: symbol already defined: "strtok"
(13254) : error 047: array sizes do not match, or destination array is too small
(13707) : error 021: symbol already defined: "HexToInt"
pawn Код:
stock HexToInt(string[])
{
if (string[0] == 0)
{
return 0;
}
new i;
new cur = 1;
new res = 0;
for (i = strlen(string); i > 0; i--)
{
if (string[i-1] < 58)
{
res = res + cur * (string[i - 1] - 48);
}
else
{
res = res + cur * (string[i-1] - 65 + 10);
cur = cur * 16;
}
}
return res;
}
stock strtok(const string[], &index)
{
new length = strlen(string);
while ((index < length) && (string[index] <= ' '))
{
index++;
}
new offset = index;
new result[20];
while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string[index];
index++;
}
result[index - offset] = EOS;
return result;
}
+REP to everyone who will help me