strange errors - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: strange errors (
/showthread.php?tid=289378)
strange errors -
fordawinzz - 11.10.2011
pawn Код:
if(!strcmp(cmdtext, "/makepers", true))
{
new File:gFile;
if(IsPlayerInAnyVehicle(playerid))
{
new stringz[3000];
new Float:x, Float:y, Float:z, Float: a;
GetVehiclePos(GetPlayerVehicleID(playerid), x,y,z);
GetVehicleZAngle(GetPlayerVehicleID(playerid), a);
if(!fexist("carsbla.txt"))
{
gFile = fopen("carsbla.txt", io_write);
fclose(gFile);
}
gFile = fopen("carsbla.txt", io_append);
format(stringz, sizeof(stringz), "Model=%d\r\nLocation_X=%f\r\n\
Location_Y=%f\r\n\
Location_Z=%f\r\n\
Angle=%f\r\n\
Location_Xdef=%f\r\n\
Location_Ydef=%f\r\n\
Location_Zdef=%f\r\n\
Angledef=%f\r\n\
Color_1=-1\r\n\
Color_2=-1=\r\n\
Owner=Dealership\r\n\
Description=Test\r\n\
Price=1000000\r\n\
License=Test\r\n\
Licensedef=Test\r\n\
Owned=0\r\n\
Locked=0\r\n\
Mod1=0\r\nMod2=0\r\nMod3=0\r\nMod4=0\r\nMod5=0\r\nMod6=0\r\nMod7=0\r\nMod8=0\r\nMod9=0\r\nMod10=0\r\n\Mod11=0\r\nMod12=0\r\nMod13=0\r\nMod14=0\r\nMod15=0\r\nMod16=0\r\nMod17=0\r\nPaintjob=0\r\n\n",GetVehicleModel(GetPlayerVehicleID(playerid)),x,y,z,a,x,y,z,a);
fwrite(gFile, stringz);
fclose(gFile);
}
return 1;
}
what's wrong? I get some strange errors that the line is too long, wtf?
Код:
error 075: input line too long (after substitutions)
error 027: invalid character constant
error 017: undefined symbol "Model"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Re: strange errors -
FarSe. - 11.10.2011
pawn Код:
format(stringz, sizeof(stringz), "Model=%d\r\nLocation_X=%f\r\n\
Location_Y=%f\r\n\
Location_Z=%f\r\n\
Angle=%f\r\n\
Location_Xdef=%f\r\n\
Location_Ydef=%f\r\n\
Location_Zdef=%f\r\n\
Angledef=%f\r\n",GetVehicleModel(GetPlayerVehicleID(playerid)),x,y,z,a,x,y,z,a);
strcat(stringz,"\
Color_1=-1\r\n\
Color_2=-1=\r\n\
Owner=Dealership\r\n\
Description=Test\r\n\
Price=1000000\r\n\
License=Test\r\n\
Licensedef=Test\r\n\
Owned=0\r\n\
Locked=0\r\n\
Mod1=0\r\n");
strcat(stringz,"\
Mod2=0\r\n\
Mod3=0\r\n\
Mod4=0\r\n\
Mod5=0\r\n\
Mod6=0\r\n\
Mod7=0\r\n\
Mod8=0\r\n\
Mod9=0\r\n\
Mod10=0\r\n");
strcat(stringz,"\
Mod11=0\r\n\
Mod12=0\r\n\
Mod13=0\r\n\
Mod14=0\r\n\
Mod15=0\r\n\
Mod16=0\r\n\
Mod17=0\r\n\
Paintjob=0\r\n\n);
Re: strange errors -
Wesley221 - 11.10.2011
Show us the errors, and at which line do they appear