Skripta koju koristim: Moja od 0
Detaljan opis problema:Evo pokazat cu vam sto mi izbaci kad sam stavio veh komandu
Dio skripte:
C:\Users\Alex\Desktop\Mod od 0\gamemodes\Untitled.pwn(569) : error 017: undefined symbol "strtok"
C:\Users\Alex\Desktop\Mod od 0\gamemodes\Untitled.pwn(570) : error 017: undefined symbol "tmp"
C:\Users\Alex\Desktop\Mod od 0\gamemodes\Untitled.pwn(576) : error 017: undefined symbol "tmp"
C:\Users\Alex\Desktop\Mod od 0\gamemodes\Untitled.pwn(578) : error 017: undefined symbol "tmp"
C:\Users\Alex\Desktop\Mod od 0\gamemodes\Untitled.pwn(578) : error 017: undefined symbol "strtok"
C:\Users\Alex\Desktop\Mod od 0\gamemodes\Untitled.pwn(579) : error 017: undefined symbol "tmp"
C:\Users\Alex\Desktop\Mod od 0\gamemodes\Untitled.pwn(585) : error 017: undefined symbol "tmp"
C:\Users\Alex\Desktop\Mod od 0\gamemodes\Untitled.pwn(586) : error 017: undefined symbol "COLOR_GREY"
C:\Users\Alex\Desktop\Mod od 0\gamemodes\Untitled.pwn(590) : error 017: undefined symbol "CreatedCars"
C:\Users\Alex\Desktop\Mod od 0\gamemodes\Untitled.pwn(590) : error 017: undefined symbol "CreatedCar"
C:\Users\Alex\Desktop\Mod od 0\gamemodes\Untitled.pwn(590) : error 029: invalid expression, assumed zero
C:\Users\Alex\Desktop\Mod od 0\gamemodes\Untitled.pwn(590) : fatal error 107: too many error messages on one line
Neke slike/video za lakse dobivanje pomoci(neobavezno)://
[/quote]
Posalji komandu ne mogu ovako napamet
if(strcmp(cmd, "/veh", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "USAGE: /veh [veh id] [boja 1] [boja 2]");
return 1;
}
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_RED, " Veh ID mora biti veci od 600 i manji od 611 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_RED, "USAGE: /veh [veh id] [boja 1] [boja 2]");
return 1;
}
new color1;
color1 = strval(tmp);
if(color1 < -1 || color1 > 126) { SendClientMessage(playerid, COLOR_RED, " Boja mora biti od ID 0 do ID 126 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /veh [veh id] [boja 1] [boja 2]");
return 1;
}
new color2;
color2 = strval(tmp);
if(color2 < -1 || color2 > 126) { SendClientMessage(playerid, COLOR_GREY, " Boja mora biti od ID 0 do ID 126 !"); return 1; }
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(car, X,Y+5,Z+1, 0.0, color1, color2, 60000);
CreatedCars[CreatedCar] = carid;
CreatedCar ++;
LinkVehicleToInterior(carid, GetPlayerInterior(playerid));
SetVehicleVirtualWorld(carid, GetPlayerVirtualWorld(playerid));
format(string, sizeof(string), "** Vozilo %d stvoreno.", carid);
SendClientMessage(playerid, COLOR_GREY, string);
}
return 1;
}
Jel ti pod onplayercommandtext stavljeno? Ako jeste nadji na netu stockove/definicije strtoka i tmpa a ako ti nije stavi pod onplayercommandtext
EDIT: tmp definises ovako new tmp[128]; na primer :)
aj daj mi ti sve sto treba pls pls tek sam pocetnik u skriptanju
nmg sad da ti posaljem jer sam na mobu, ajd kucaj na google undefined symbol strtok samp i udji na prvi rezultat i tu ce ti biti dat stock strtok e to ubaci samo pri vrhu tvoje fs ispod definicija negde, ako se ne snadjes uradicu ti ja kasnije...
a vidim ovo si iscupao iz nekog moda pa iz istog tog moda idi trazi definicije znaci kucas u trazilici u modu createdcars pa strtok i tako...
jesam sve ali pogledaj sto mi sada izbaci
:\Users\Alex\Desktop\Mod od 0\gamemodes\Untitled.pwn(1076) : error 010: invalid function or declaration
Daj mi tu liniju 1076
to sam rijesio uspio sam compilati ali sada kad kucam veh i sve samo mi ponovno pokaze veh id boja1 boja2
Iz tog moda odakle kopiras komandu /veh definisi to sto je u errorima i to je to :P
Citat: 'Stojanovskiâ,,¢ poslato Jul 13, 2013, 10:31:52 PRE PODNE
Iz tog moda odakle kopiras komandu /veh definisi to sto je u errorima i to je to :P
Citaj malo vec sam mu to rekao