05.09.2012, 10:00
Hello!
I just changed my editor from the default pawno over to sa-mp editor v0.2.
The first thing i did, was to copy all includes from the default pawno include folder, over to the new include folder that the editor v0.2 uses.
But, then i get problems.

Those errors didnt appear in the default pawno editor, and i am suspecting that there might be some includes conflicting. But, am i wrong ?
Here is the codes most of the errors are located: (i have set Numbers on the lines that the compiler says is wrong, just check the pawn code)
Can someone see what include or what's wrong with this ? Thanks!
I just changed my editor from the default pawno over to sa-mp editor v0.2.
The first thing i did, was to copy all includes from the default pawno include folder, over to the new include folder that the editor v0.2 uses.
But, then i get problems.

Those errors didnt appear in the default pawno editor, and i am suspecting that there might be some includes conflicting. But, am i wrong ?
Here is the codes most of the errors are located: (i have set Numbers on the lines that the compiler says is wrong, just check the pawn code)
pawn Код:
dcmd_v (playerid,params[]) //line number 4934
{
new Index;
new tmp[256]; tmp = strtok(params,Index);
new tmp2[256]; tmp2 = strtok(params,Index);
new tmp3[256]; tmp3 = strtok(params,Index);
if(!strlen(tmp)) return
SendClientMessage(playerid, COLOR_BLUE, "Usage: /v [ModelID/Name] [Colour1] [Colour2]") && //line 4941
SendClientMessage(playerid, COLOR_GREEN, "Function: Will create a Car with specified Colours");
new car;
new string[128];
new colour1, colour2;
if(!IsNumeric(tmp))
car = GetVehicleModelIDFromName(tmp);
else car = strval(tmp);
if(car < 400 || car > 611) return SendClientMessage(playerid, COLOR_RED, "ERROR: Invalid Vehicle Model ID!");//line 4949
if(!strlen(tmp2)) colour1 = random(126); else colour1 = strval(tmp2);
if(!strlen(tmp3)) colour2 = random(126); else colour2 = strval(tmp3);
new LVehicleID;
new Float:X,Float:Y,Float:
new Float:Angle,int1;
GetPlayerPos(playerid, X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
int1 = GetPlayerInterior(playerid);
LVehicleID = CreateVehicle(car, X,Y,Z, Angle, colour1, colour2, -1);
LinkVehicleToInterior(LVehicleID,int1);
AccInfo[playerid][pCar] = LVehicleID;
PutPlayerInVehicle(playerid, LVehicleID, 0);
format(string, sizeof(string), "|- You have Spawned a \"%s\" (Model: %d) with Colours: %d,%d -|", VehicleNames[car-400], car, colour1, colour2);
return SendClientMessage(playerid,COLOR_BLUE, string);//line 4964
}
dcmd_car (playerid,params[])
{
new Index;
new tmp[256]; tmp = strtok(params,Index);
new tmp2[256]; tmp2 = strtok(params,Index);
new tmp3[256]; tmp3 = strtok(params,Index);
if(!strlen(tmp)) return
SendClientMessage(playerid, COLOR_BLUE, "Usage: /v [ModelID/Name] [Colour1] [Colour2]") && //Line 4975
SendClientMessage(playerid, COLOR_GREEN, "Function: Will create a Car with specified Colours");
new car;
new string[128];
new colour1, colour2;
if(!IsNumeric(tmp))
car = GetVehicleModelIDFromName(tmp);
else car = strval(tmp);
if(car < 400 || car > 611) return SendClientMessage(playerid, COLOR_RED, "ERROR: Invalid Vehicle Model ID!");//Line 4983
if(!strlen(tmp2)) colour1 = random(126); else colour1 = strval(tmp2);
if(!strlen(tmp3)) colour2 = random(126); else colour2 = strval(tmp3);
new LVehicleID;
new Float:X,Float:Y,Float:Z;
new Float:Angle,int1;
GetPlayerPos(playerid, X,Y,Z);
GetPlayerFacingAngle(playerid,Angle);
int1 = GetPlayerInterior(playerid);
LVehicleID = CreateVehicle(car, X,Y,Z, Angle, colour1, colour2, -1);
LinkVehicleToInterior(LVehicleID,int1);
AccInfo[playerid][pCar] = LVehicleID;
PutPlayerInVehicle(playerid, LVehicleID, 0);
format(string, sizeof(string), "|- You have Spawned a \"%s\" (Model: %d) with Colours: %d,%d -|", VehicleNames[car-400], car, colour1, colour2);
return SendClientMessage(playerid,COLOR_BLUE, string); //Line 4998
}
GetVehicleModelIDFromName(vname[])
{
for(new i = 0; i < 211; i++)
{
if ( strfind(VehicleNames[i], vname, true) != -1 )
return i + 400;
}
return -1;
}
//and this empty line is 5012
Can someone see what include or what's wrong with this ? Thanks!