must be a variable. Assumed 0. How to solve this?
#1

I am trying to build a command to attach the camera to your car. but i get 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
The code is below. I bolded the line 42. How can I solve this?

Код:
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;
}
Reply


Messages In This Thread
must be a variable. Assumed 0. How to solve this? - by HeLiOn_PrImE - 14.09.2012, 11:22
Re: must be a variable. Assumed 0. How to solve this? - by Rudy_ - 14.09.2012, 11:24
Re: must be a variable. Assumed 0. How to solve this? - by HeLiOn_PrImE - 14.09.2012, 11:26
Re: must be a variable. Assumed 0. How to solve this? - by Vince - 14.09.2012, 11:29
Re: must be a variable. Assumed 0. How to solve this? - by HeLiOn_PrImE - 14.09.2012, 11:47

Forum Jump:


Users browsing this thread: 1 Guest(s)