Jump to content
  • 0

pomoc park


bOmBi

Dotaz

čč prosím o pomoc ...2 errory+1 warning

(1446) : error 033: array must be indexed (variable "file")
(1449) : error 001: expected token: ",", but found ";"
(1453) : warning 203: symbol is never used: "park"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

riadky

public OnVehicleSpawn()
{
new vehicleid;
new file[128];
new playerid;
new string[64];
format(file, sizeof(file), AUTA, GetPlayerVehicleID(playerid));
SendClientMessage(playerid,0xFFFFFFAA,string);
(1449) if(fexists(file))
{
SetVehiclePos(vehicleid, dini_Float(file, "XPos"),dini_Float(file, "YPos"),dini_Float(file, "ZPos"));
(1449) SetVehicleZAngle(vehicleid, dini_Float(file, "Rot");
}
return 1;
}
(1453)

Link to comment
Share on other sites

7 odpovědí na tuto otázku

Recommended Posts

  • 0
čč prosím o pomoc ...2 errory+1 warning

(1446) : error 033: array must be indexed (variable "file")
(1449) : error 001: expected token: ",", but found ";"
(1453) : warning 203: symbol is never used: "park"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

riadky

public OnVehicleSpawn()
{
new vehicleid;
new file[128];
new playerid;
new string[64];
format(file, sizeof(file), AUTA, GetPlayerVehicleID(playerid));
SendClientMessage(playerid,0xFFFFFFAA,string);
(1449) if(fexists(file))
{
SetVehiclePos(vehicleid, dini_Float(file, "XPos"),dini_Float(file, "YPos"),dini_Float(file, "ZPos"));
(1449) SetVehicleZAngle(vehicleid, dini_Float(file, "Rot");
}
return 1;
}
(1453)

 

1446 - uprav si riadok 1444 ( format(file,sizeof(file),"Vozidlo %d",GetPlayerVehicleID(playerid)); // miesto "Vozidlo %d" si daj svoj text !

1449 - Otvoril si 2 zátvorky a uzavrel len 1 ! Pridaj si tam ešte 1 „)“.

1453 - Nepoužil si premmenú „park“. Musíš ju niekde použiť !

Link to comment
Share on other sites

  • 0
čč prosím o pomoc ...2 errory+1 warning

(1446) : error 033: array must be indexed (variable "file")
(1449) : error 001: expected token: ",", but found ";"
(1453) : warning 203: symbol is never used: "park"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.

riadky

public OnVehicleSpawn()
{
new vehicleid;
new file[128];
new playerid;
new string[64];
format(file, sizeof(file), AUTA, GetPlayerVehicleID(playerid));
SendClientMessage(playerid,0xFFFFFFAA,string);
(1449) if(fexists(file))
{
SetVehiclePos(vehicleid, dini_Float(file, "XPos"),dini_Float(file, "YPos"),dini_Float(file, "ZPos"));
(1449) SetVehicleZAngle(vehicleid, dini_Float(file, "Rot");
}
return 1;
}
(1453)

 

1446 - uprav si riadok 1444 ( format(file,sizeof(file),"Vozidlo %d",GetPlayerVehicleID(playerid)); // miesto "Vozidlo %d" si daj svoj text !

1449 - Otvoril si 2 zátvorky a uzavrel len 1 ! Pridaj si tam ešte 1 „)“.

1453 - Nepoužil si premmenú „park“. Musíš ju niekde použiť !

 

ok ostal mi ale jeden error 033: array must be indexed (variable "file")

 

na tento riadok

if(fexists(file))

Link to comment
Share on other sites

  • 0
public OnVehicleSpawn()

{

new vehicleid;

new file[128];

new playerid;

new string[64];

format(file, sizeof(file), AUTA, GetPlayerVehicleID(playerid));

SendClientMessage(playerid,0xFFFFFFAA,string);

if(fexists(file))

{

SetVehiclePos(vehicleid, dini_Float(file, "XPos"),dini_Float(file, "YPos"),dini_Float(file, "ZPos"));

SetVehicleZAngle(vehicleid, dini_Float(file, "Rot");

}

return 1;

}

Ako už Petr písal tak ti tam chýbajú paramtre :

http://wiki.sa-mp.com/wiki/OnVehicleSpawn

A odstráň si :

new vehicleid; // toto sa ti nadefinuje v parametroch publicu

new playerid; // na toto použi cyklus FOR

 

Ďalej :

SendClientMessage(playerid,0xFFFFFFAA,string); // Toto ti odošle prázdny string... Načo ?

Buď si to odstráň alebo si uprav ten string.

 

A nakoniec :

Pošli sem ako si spravil ten String „file“.

Link to comment
Share on other sites

  • 0
#define AUTA "PARKING\\%i.ini"

CMD:park(playerid, params[])
{
new Float:X, Float:Y, Float:Z, Float:A, file[128];
format(file, sizeof(file), AUTA, GetPlayerVehicleID(playerid));
GetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
GetVehicleZAngle(GetPlayerVehicleID(playerid), A);
dini_FloatSet(file, "XPos", X);
dini_FloatSet(file, "YPos", Y);
dini_FloatSet(file, "ZPos", Z);
dini_FloatSet(file, "Rot", A);
SendClientMessage(playerid, 0x33AA33AA, "Vaše auto bolo zaparkované.");
return 1;
}
public OnVehicleSpawn(vehicleid)
{
new file[128];
new playerid;
format(file,sizeof(file),"Vaše auto bolo zaparkované.",GetPlayerVehicleID(playerid));
if(fexists(file))
{
SetVehiclePos(vehicleid, dini_Float(file, "XPos"),dini_Float(file, "YPos"),dini_Float(file, "ZPos"));
SetVehicleZAngle(vehicleid, dini_Float(file, "Rot"));
}
return 1;
}

Link to comment
Share on other sites

  • 0
#define AUTA "PARKING\\%i.ini"

CMD:park(playerid, params[])
{
new Float:X, Float:Y, Float:Z, Float:A, file[128];
format(file, sizeof(file), AUTA, GetPlayerVehicleID(playerid));
GetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
GetVehicleZAngle(GetPlayerVehicleID(playerid), A);
dini_FloatSet(file, "XPos", X);
dini_FloatSet(file, "YPos", Y);
dini_FloatSet(file, "ZPos", Z);
dini_FloatSet(file, "Rot", A);
SendClientMessage(playerid, 0x33AA33AA, "Vaše auto bolo zaparkované.");
return 1;
}
public OnVehicleSpawn(vehicleid)
{
new file[128];
new playerid;
format(file,sizeof(file),"Vaše auto bolo zaparkované.",GetPlayerVehicleID(playerid));
if(fexists(file))
{
SetVehiclePos(vehicleid, dini_Float(file, "XPos"),dini_Float(file, "YPos"),dini_Float(file, "ZPos"));
SetVehicleZAngle(vehicleid, dini_Float(file, "Rot"));
}
return 1;
}

 

jžš :d

 

máš

format(file,sizeof(file),"Vaše auto bolo zaparkované.",GetPlayerVehicleID(playerid));

 

a kde maš SendClientMessage?? to bude pisať do vzduchu? :d

Link to comment
Share on other sites

  • 0
#define AUTA "PARKING\\%i.ini"

CMD:park(playerid, params[])
{
new Float:X, Float:Y, Float:Z, Float:A, file[128];
format(file, sizeof(file), AUTA, GetPlayerVehicleID(playerid));
GetVehiclePos(GetPlayerVehicleID(playerid), X, Y, Z);
GetVehicleZAngle(GetPlayerVehicleID(playerid), A);
dini_FloatSet(file, "XPos", X);
dini_FloatSet(file, "YPos", Y);
dini_FloatSet(file, "ZPos", Z);
dini_FloatSet(file, "Rot", A);
SendClientMessage(playerid, 0x33AA33AA, "Vaše auto bolo zaparkované.");
return 1;
}
public OnVehicleSpawn(vehicleid)
{
new file[128];
new playerid;
format(file,sizeof(file),"Vaše auto bolo zaparkované.",GetPlayerVehicleID(playerid));
if(fexists(file))
{
SetVehiclePos(vehicleid, dini_Float(file, "XPos"),dini_Float(file, "YPos"),dini_Float(file, "ZPos"));
SetVehicleZAngle(vehicleid, dini_Float(file, "Rot"));
}
return 1;
}

 

jžš :d

 

máš

format(file,sizeof(file),"Vaše auto bolo zaparkované.",GetPlayerVehicleID(playerid));

 

a kde maš SendClientMessage?? to bude pisať do vzduchu? :d

jj som to opravil...ale mám tam ešte vždy ten eror

error 033: array must be indexed (variable "file")

if(fexists(file))

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...