bOmBi 0 Odesláno: 23. Únor, 2012 Share Odesláno: 23. Únor, 2012 čč 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 More sharing options...
0 Quiter 99 Odesláno: 23. Únor, 2012 Share Odesláno: 23. Únor, 2012 čč 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 More sharing options...
0 Petr 44 Odesláno: 23. Únor, 2012 Share Odesláno: 23. Únor, 2012 u OnVehicleSpawn jsi zapomněl parametry. Link to comment Share on other sites More sharing options...
0 bOmBi 0 Odesláno: 23. Únor, 2012 Author Share Odesláno: 23. Únor, 2012 čč 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 More sharing options...
0 Quiter 99 Odesláno: 24. Únor, 2012 Share Odesláno: 24. Únor, 2012 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 More sharing options...
0 bOmBi 0 Odesláno: 24. Únor, 2012 Author Share Odesláno: 24. Únor, 2012 #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 More sharing options...
0 Arthom 6 Odesláno: 24. Únor, 2012 Share Odesláno: 24. Únor, 2012 #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žš máš format(file,sizeof(file),"Vaše auto bolo zaparkované.",GetPlayerVehicleID(playerid)); a kde maš SendClientMessage?? to bude pisať do vzduchu? Link to comment Share on other sites More sharing options...
0 bOmBi 0 Odesláno: 24. Únor, 2012 Author Share Odesláno: 24. Únor, 2012 #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žš máš format(file,sizeof(file),"Vaše auto bolo zaparkované.",GetPlayerVehicleID(playerid)); a kde maš SendClientMessage?? to bude pisať do vzduchu? 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 More sharing options...
Dotaz
bOmBi 0
čč prosím o pomoc ...2 errory+1 warning
riadky
Link to comment
Share on other sites
7 odpovědí na tuto otázku
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now