Problem with strmid and format. - 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: Problem with strmid and format. (
/showthread.php?tid=405214)
Problem with strmid and format. -
shady001 - 05.01.2013
Can somebody tell me what is wrong whit this ? :
Код:
new Float:X,Float:Y,Float:Z,Float:A; GetPlayerPos(playerid, X,Y,Z);GetPlayerFacingAngle(playerid,A);
new thiscar = CreateVehicle(car,X,Y,Z,1,color1,color2,99999999);
CarInfo[thiscar][cModel]=car;
CarInfo[thiscar][cLocationx]=X;
CarInfo[thiscar][cLocationy]=Y;
CarInfo[thiscar][cLocationz]=Z;
CarInfo[thiscar][cAngle]=A;
CarInfo[thiscar][cColorOne]=color1;
CarInfo[thiscar][cColorTwo]=color2;
strmid(CarInfo[thiscar][cOwner],"Dealership",0,strlen("Dealership"),sizeof(CarInfo[thiscar][cOwner]));
format(CarInfo[thiscar][cDescription], sizeof(CarInfo[thiscar][cDescription]), "%s",vehName[GetVehicleModel(thiscar)-400]);
CarInfo[thiscar][cValue]=value;
CarInfo[thiscar][cLicense]=1;
CarInfo[thiscar][cOwned]=0;
CarInfo[thiscar][cLock]=0;
I get these errors :
Код:
shady.pwn(11743) : error 001: expected token: "]", but found "-identifier-"
shady.pwn(11743) : warning 215: expression has no effect
shady.pwn(11743) : error 001: expected token: ";", but found "]"
shady.pwn(11743) : error 029: invalid expression, assumed zero
shady.pwn(11743) : fatal error 107: too many error messages on one line
And the line 11743 is : strmid(CarInfo[thiscar][cOwner],"Dealership",0,strlen("Dealership"),sizeof(CarInf o[thiscar][cOwner]));
If i comment that line i get the same errors at next line. Please help !