30.06.2013, 18:25
well the title says it all here you go
some error code
pawn Код:
stock CreatePlate(vehicleid)
{
topofcreateplate:
new pstring[128];
format(pstring,sizeof(pstring),"%s",RandomizePlate(vehicleid));
if(PlateExist(pstring))
{
goto topofcreateplate;
}
SetVehicleNumberPlate(vehicleid,pstring);
format(existplate[existplatecount],sizeof(existplate),"%s",pstring);
existplatecount ++;
return pstring;
}
stock PlateExist(platestring)
{
for(new count;count < existplatecount;count++)
{
if(strcmp(existplate[count],platestring,true,7)==0)
{
return true;
}
}
return false;
}
stock RandomizePlate(vehicleid)
{
new platestring[128];
for(new platecount;platecount < 7;platecount++)
{
if((platecount)==3)
{
new addplatestring[128];
format(addplatestring,sizeof(addplatestring),"%s",platestring);
format(platestring,sizeof(platestring),"%s ",addplatestring);
continue;
}
new rand = random(1);
if((rand)==0)
{
rand = random(9);
if(isnull(platestring))
{
format(platestring,sizeof(platestring),"%i",rand);
}
else
{
new addplatestring[128];
format(addplatestring,sizeof(addplatestring),"%s",platestring);
format(platestring,sizeof(platestring),"%s%i",addplatestring,rand);
}
}
else if((rand)==1)
{
rand = random(25);
if(isnull(platestring))
{
format(platestring,sizeof(platestring),"%c",randomletters[rand]);
}
else
{
new addplatestring[128];
format(addplatestring,sizeof(addplatestring),"%s",platestring);
format(platestring,sizeof(platestring),"%s%c",addplatestring,randomletters[rand]);
}
}
}
return platestring;
}
Код:
C:\Users\joshua\Desktop\sampserver\filterscripts\jbcars.pwn(6206) : error 035: argument type mismatch (argument 1) C:\Users\joshua\Desktop\sampserver\filterscripts\jbcars.pwn(6219) : error 035: argument type mismatch (argument 2) C:\Users\joshua\Desktop\sampserver\filterscripts\jbcars.pwn(6215) : warning 203: symbol is never used: "platestring" C:\Users\joshua\Desktop\sampserver\filterscripts\jbcars.pwn(6226) : warning 203: symbol is never used: "vehicleid" C:\Users\joshua\Desktop\sampserver\filterscripts\jbcars.pwn(8626) : warning 203: symbol is never used: "carlisenceplate"