GetVehicleModelID and array must be indexed
#1

Here's my code:
Код:
if(strcmp(cmd, "/saveveh", true) == 0)
	{
 	if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,0x80000000,"Must be RCON admin to use this command");
    if(!IsPlayerInAnyVehicle(playerid))return SendClientMessage(playerid,0x80000000,"Must be inside a vehicle");
    new File:file,strtmp[128],Float:x,Float:y,Float:z,Float:a,vehid;
    file=fopen("AddStaticVehicle.txt",io_append);
    vehid=GetPlayerVehicleID(playerid);
    GetVehiclePos(vehid,x,y,z);
    GetVehicleZAngle(vehid,a);
    format(strtmp,128,"AddStaticVehicleEx(%d, %f, %f, %f, %f, -1, -1, -1);\n",GetVehicleModelID(vehid),x,y,z,a);
    fwrite(file,strtmp);
    fclose(file);
    return SendClientMessage(playerid,0x00800000,"Vehicle successfully saved.");
    }
    if(strcmp(cmd, "/savmypos", true) == 0)
	{
 if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,0x80000000,"Must be RCON admin to use this command");
    new File:file,strtmp[500],Float:x,Float:y,Float:z;
    file=fopen("SavedLocations.txt",io_append);
	PlayerPos=GetPlayerPos(playerid, x, y, z);
	GetPlayerPos(playerid, x, y, z);
    format(strtmp,500,"%f, %f, %f;\n",PlayerPos,x,y,z);
    fwrite(file,strtmp);
    fclose(file);
    return SendClientMessage(playerid,0x00800000,"On-foot cords saved.");
    }
Errors I get are:
Код:
(16426) : error 017: undefined symbol "GetVehicleModelID"
(16436) : error 033: array must be indexed (variable "PlayerPos")
Reply


Messages In This Thread
GetVehicleModelID and array must be indexed - by Jack_Leslie - 04.06.2011, 12:09
Re: GetVehicleModelID and array must be indexed - by Jeffry - 04.06.2011, 12:28
Re: GetVehicleModelID and array must be indexed - by Jack_Leslie - 04.06.2011, 12:31
Re: GetVehicleModelID and array must be indexed - by Jeffry - 04.06.2011, 13:58

Forum Jump:


Users browsing this thread: 2 Guest(s)