Balkan SA:MP

PAWN skriptanje, gamemodovi, filterskripte, include fajlovi, mape, pluginovi => Razgovor u vezi PAWN - skriptanja => Temu započeo: gamer13915 poslato Decembar 28, 2012, 15:08:07 POSLE PODNE

Naslov: [Pomoc] commanda za spawnanje vozila /veh command
Poruka od: gamer13915 poslato Decembar 28, 2012, 15:08:07 POSLE PODNE
Skripta koju koristim:moj mod od 0
Detaljan opis problema:G:\Gabriel\samp03e_svr_R2_win32\gamemodes\TEST2.pwn(158) : error 029: invalid expression, assumed zero
G:\Gabriel\samp03e_svr_R2_win32\gamemodes\TEST2.pwn(158) : warning 215: expression has no effect
G:\Gabriel\samp03e_svr_R2_win32\gamemodes\TEST2.pwn(158) : error 001: expected token: ";", but found "]"
G:\Gabriel\samp03e_svr_R2_win32\gamemodes\TEST2.pwn(158) : error 029: invalid expression, assumed zero
G:\Gabriel\samp03e_svr_R2_win32\gamemodes\TEST2.pwn(158) : fatal error 107: too many error messages on one line
izbacuje mi ove errore nemogu ih rješiti jer sam novi u skriptanju
Dio skripte:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/teleport", cmdtext, true, 10) == 0)
{
ShowPlayerDialog(playerid, 20323, DIALOG_STYLE_LIST, "Teleport", "Planina\nWinewood\nGranica", "Teleport", "Exit");
return 1;
}
if (strcmp("/teleport2", cmdtext, true, 10 ) == 0)
{
SetPlayerPos(playerid, 1674.2566,-1401.9370,84.6563);
SetPlayerInterior(playerid,0);
SendClientMessage(playerid, COLOR_YELLOW, "You have been teleported to building");
}
if (strcmp("/p", cmdtext, true, 10 ) == 0)
{
GivePlayerWeapon(playerid,46, 999);
}
if(strcmp(cmdtext,"/otvori",true)==0)
{
MoveObject(gate, 267.7998046875, -1331.099609375, 52.299999237061, 10);
SendClientMessage(playerid, COLOR_YELLOW, "Vrata se otvaraju.");
SetTimer("gateTimer", 900, 0);
}
if(strcmp(cmdtext, "/fix", true) == 0)
{
RepairVehicle(GetPlayerVehicleID(playerid));



}
if(strcmp(cmdtext, "/veh", true) == 0)
{
if(IsPlayerConnected(playerid))
{
158----> if(PlayerInfo[playerid][pAdmin] < 1337)
{
SendClientMessage(playerid, COLOR_YELLOW, "Nisi ovlasten!");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_YELLOW, "KORISTENJE: /veh [carid] [color1] [color2]");
return 1;
}
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_YELLOW, "Broj vozila ne može biti ispod 400 ili preko 611 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_YELLOW, "KORISTENJE: /veh [carid] [color1] [color2]");
return 1;
}
new color1;
color1 = strval(tmp);
if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_YELLOW, "Broj boje ne može biti ispod 0 ili preko 126 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_YELLOW, "KORISTENJE: /veh [carid] [color1] [color2]");
return 1;
}
new color2;
color2 = strval(tmp);
if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_YELLOW, "Broj boje ne može biti ispod 0 ili preko 126 !"); return 1; }
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000);
CreatedCars[CreatedCar] = carid;
CreatedCar ++;
format(string, sizeof(string), "Vozilo %d stvoreno.", carid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
return 1;
}
[b]Neke slike/video za lakse dobivanje pomoci(neobavezno)[/b]:\
Ondje gore sam odvojio malo komandu /veh kako bi se vidila,a komandu sam kopirao iz nečijeg moda zato što je nisam znao napraviti sam
Naslov: Odg: [Pomoc] commanda za spawnanje vozila /veh command
Poruka od: [GU:RP] Ivica poslato Decembar 28, 2012, 15:10:23 POSLE PODNE
daj tu liniju na koju ti baca to ne cijelu komandu
Naslov: Odg: [Pomoc] commanda za spawnanje vozila /veh command
Poruka od: gamer13915 poslato Decembar 28, 2012, 20:10:13 POSLE PODNE
158----> if(PlayerInfo[playerid][pAdmin] < 1337)
evo
Naslov: Odg: [Pomoc] commanda za spawnanje vozila /veh command
Poruka od: gamer13915 poslato Januar 03, 2013, 11:27:42 PRE PODNE
Jel mi može netko pomoći ? unaprijed hvala
Naslov: Odg: [Pomoc] commanda za spawnanje vozila /veh command
Poruka od: |W|SoaD123 poslato Januar 03, 2013, 11:50:56 PRE PODNE
probaj staviti <= 1337
Naslov: Odg: [Pomoc] commanda za spawnanje vozila /veh command
Poruka od: Blaeks poslato Januar 03, 2013, 13:07:59 POSLE PODNE
proveri gde si stavio tu komandu, i imao si jednu nepotrebnu zagradicu, stavi ovako if(strcmp(cmdtext, "/veh", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, COLOR_YELLOW, "Nisi ovlasten!");
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_YELLOW, "KORISTENJE: /veh [carid] [color1] [color2]");
return 1;
}
new car;
car = strval(tmp);
if(car < 400 || car > 611) { SendClientMessage(playerid, COLOR_YELLOW, "Broj vozila ne može biti ispod 400 ili preko 611 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_YELLOW, "KORISTENJE: /veh [carid] [color1] [color2]");
return 1;
}
new color1;
color1 = strval(tmp);
if(color1 < 0 || color1 > 126) { SendClientMessage(playerid, COLOR_YELLOW, "Broj boje ne može biti ispod 0 ili preko 126 !"); return 1; }
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_YELLOW, "KORISTENJE: /veh [carid] [color1] [color2]");
return 1;
}
new color2;
color2 = strval(tmp);
if(color2 < 0 || color2 > 126) { SendClientMessage(playerid, COLOR_YELLOW, "Broj boje ne može biti ispod 0 ili preko 126 !"); return 1; }
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid, X,Y,Z);
new carid = CreateVehicle(car, X,Y,Z, 0.0, color1, color2, 60000);
CreatedCars[CreatedCar] = carid;
CreatedCar ++;
format(string, sizeof(string), "Vozilo %d stvoreno.", carid);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
}
return 1;
}
Naslov: Odg: [Pomoc] commanda za spawnanje vozila /veh command
Poruka od: gamer13915 poslato Januar 04, 2013, 20:17:22 POSLE PODNE
izbacuje mi ove errore
G:\Gabriel\samp03e_svr_R2_win32\gamemodes\TEST2.pwn(158) : error 029: invalid expression, assumed zero
G:\Gabriel\samp03e_svr_R2_win32\gamemodes\TEST2.pwn(158) : warning 215: expression has no effect
G:\Gabriel\samp03e_svr_R2_win32\gamemodes\TEST2.pwn(158) : error 001: expected token: ";", but found "]"
G:\Gabriel\samp03e_svr_R2_win32\gamemodes\TEST2.pwn(158) : error 029: invalid expression, assumed zero
G:\Gabriel\samp03e_svr_R2_win32\gamemodes\TEST2.pwn(158) : fatal error 107: too many error messages on one line
na  liniji
if(PlayerInfo[playerid][pAdmin] < 1337) return SendClientMessage(playerid, COLOR_YELLOW, "Nisi ovlasten!");

commandu sam stavio pod on player command text
Naslov: Odg: [Pomoc] commanda za spawnanje vozila /veh command
Poruka od: gamer13915 poslato Januar 08, 2013, 22:01:42 POSLE PODNE
moram ponovno osvjeziti temu da mi netko pomogne ako zna