14.09.2012, 11:22
I am trying to build a command to attach the camera to your car. but i get this:
The code is below. I bolded the line 42. How can I solve this?
Код:
C:\Users\HeLiOn\Desktop\camtest.pwn(42) : error 008: must be a constant expression; assumed zero C:\Users\HeLiOn\Desktop\camtest.pwn(42) : error 029: invalid expression, assumed zero C:\Users\HeLiOn\Desktop\camtest.pwn(42) : error 029: invalid expression, assumed zero C:\Users\HeLiOn\Desktop\camtest.pwn(42) : fatal error 107: too many error messages on one line
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/camtest", cmdtext, true, 10) == 0) { new p = GetPlayerVehicleID(playerid); new campos[playerid] = CreatePlayerObject(playerid,19300, 0., 0,0, 0.0000, -1, -1, 100); AttachPlayerObjectToVehicle(playerid,campos[playerid],p,0.0, 0.0, 5.510000, 0.000000, 0.000000, 0.000000); AttachCameraToPlayerObject(playerid,campos[playerid]); } if (strcmp("/resetcam", cmdtext, true, 10) == 0) { DestroyObject(object[playerid]); return 1; } return 0; }