Quote:
Originally Posted by yLuSsSIoN
I tried as you said and its giving me 8 Errors :
pawn Код:
C:\Users\User\Desktop\Downloads\filehost_SkyZone-GF\pronion\filterscripts\veh.pwn(245) : error 017: undefined symbol "strtok" C:\Users\User\Desktop\Downloads\filehost_SkyZone-GF\pronion\filterscripts\veh.pwn(245) : error 033: array must be indexed (variable "cmd") C:\Users\User\Desktop\Downloads\filehost_SkyZone-GF\pronion\filterscripts\veh.pwn(255) : error 017: undefined symbol "strtok" C:\Users\User\Desktop\Downloads\filehost_SkyZone-GF\pronion\filterscripts\veh.pwn(255) : error 033: array must be indexed (variable "tmp") C:\Users\User\Desktop\Downloads\filehost_SkyZone-GF\pronion\filterscripts\veh.pwn(258) : error 017: undefined symbol "GetVehicleModelIDFromName" C:\Users\User\Desktop\Downloads\filehost_SkyZone-GF\pronion\filterscripts\veh.pwn(268) : error 017: undefined symbol "GetXYInFrontOfPlayer" C:\Users\User\Desktop\Downloads\filehost_SkyZone-GF\pronion\filterscripts\veh.pwn(272) : error 017: undefined symbol "GetXYInFrontOfPlayer" C:\Users\User\Desktop\Downloads\filehost_SkyZone-GF\pronion\filterscripts\veh.pwn(282) : error 030: compound statement not closed at the end of file (started at line 250) Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
8 Errors.
|
Add this after it:
pawn Код:
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;
}
GetVehicleModelIDFromName(vname[])
{
for(new i = 0; i < 211; i++)
{
if(strfind(aVehicleNames[i], vname, true) != -1)
return i + 400;
}
return -1;
}
stock GetXYInFrontOfPlayer(playerid, &Float:x2, &Float:y2, Float:distance)
{
new Float:a;
GetPlayerPos(playerid, x2, y2, a);
GetPlayerFacingAngle(playerid, a);
if(GetPlayerVehicleID(playerid))
{
GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
}
x2 += (distance * floatsin(-a, degrees));
y2 += (distance * floatcos(-a, degrees));
}