[HELP]Error gm.
#1

Error:
Код:
C:\Users\Gabri\Desktop\Untitled.pwn(508) : error 029: invalid expression, assumed zero
C:\Users\Gabri\Desktop\Untitled.pwn(508) : error 029: invalid expression, assumed zero
C:\Users\Gabri\Desktop\Untitled.pwn(508) : error 029: invalid expression, assumed zero
C:\Users\Gabri\Desktop\Untitled.pwn(508) : fatal error 107: too many error messages on one line
Help Me


Pawno Code:
PHP код:
505.if (strcmp("/noarmatura_|" cmdtexttrue)==0)
506.SetPlayerArmour(playerid,0);
507.SendClientMessage(playeridCOLOR_VERDE"Hai tolto l'armatura");
508.strtok(const string[] &index)
509.{
510.new length strlen(string);
511.    while ((index length) && (string[index] <= ' '))
512.    {
513.        index++;
514.    }
515.    new offset index;
516.    new result[20];
517.    while ((index length) && (string[index] > ' ') && ((index offset) < (sizeof(result) - 1)))
518.    {
519.        result[index offset] = string[index];
520.        index++;
521.    }
522.    result[index offset] = EOS;
523.    return result
Reply
#2

You forgot the brackets!

pawn Код:
if (strcmp("/noarmatura", cmdtext, true) == 0)
{
    SetPlayerArmour(playerid,0);
    SendClientMessage(playerid, COLOR_VERDE, "Hai tolto l'armatura");
    return 1;
}
That ^ one should work. Place it under OnPlayerCommandText.
Reply
#3

Nothing happens, it is always the same thing
Reply
#4

Could you release that piece of code? I'll look into it.
Reply
#5

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256], idx;
    cmd = strtok(cmdtext, idx);
    if(strcmp(cmd, "/noarmatura_|", true) == 0)
    {
        SetPlayerArmour(playerid,0);
        SendClientMessage(playerid, COLOR_VERDE, "Hai tolto l'armatura");
        return 1;
    }
    return 0;
}

strtok(const string[], &index)
{
    new length = strlen(string);
    while((index < length) && (string[index] <= ' '))
    {
        index++;
    }
    new offset = index;
    new result[20];
    while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1)))
    {
        result[index - offset] = string[index];
        index++;
    }
    result[index - offset] = EOS;
    return result;
}
Reply
#6

PHP код:
//Fixed By Mounty Non togliere crediti//
#include <a_samp>
#include <dudb>
#include <a_players>
#include <dini>
#pragma tabsize 0
// Colori
#define COLOR_ROSSO 0xAA3333AA
#define COLOR_GRIGIO 0xAFAFAFAA
#define COLOR_VERDE 0x33AA33AA
#define COLOR_GIALLO 0xFFFF00AA
#define COLOR_BLU 0x1111AAFF
#define COLOR_ROSA 0xFF66FFAA
#define COLOR_BLUCHIARO 0x33CCFFAA
#define COLOR_ROSSOSCURO 0x660000AA
#define COLOR_ARANCIONE 0xFF9900AA
#define COLOR_BIANCO 0xFFFFFFAA
#define ADMINFS_MESSAGE_COLOR 0xFF444499
#define PM_INCOMING_COLOR     0xFFFF22AA
#define PM_OUTGOING_COLOR     0xFFCC2299
#define COLOR_VERDECHIARO 0x18FE12FF
new vehName[][] =
{
"Landstalker""Bravura""Buffalo""Linerunner""Perrenial""Sentinel""Dumper""Firetruck""Trashmaster",
"Stretch""Manana""Infernus""Voodoo""Pony""Mule""Cheetah""Ambulance""Leviathan""Moonbeam",
"Esperanto""Taxi""Washington""Bobcat""Whoopee""BF Injection""Hunter""Premier""Enforcer",
"Securicar""Banshee""Predator""Bus""Rhino""Barracks""Hotknife""Trailer""Previon""Coach",
"Cabbie""Stallion""Rumpo""RC Bandit""Romero""Packer""Monster""Admiral""Squalo""Seasparrow",
"Pizzaboy""Tram""Trailer""Turismo""Speeder""Reefer""Tropic""Flatbed""Yankee""Caddy""Solair",
"Berkley's RC Van""Skimmer""PCJ-600""Faggio""Freeway""RC Baron""RC Raider""Glendale""Oceanic",
"Sanchez""Sparrow""Patriot""Quad""Coastguard""Dinghy""Hermes""Sabre""Rustler""ZR-350""Walton",
"Regina""Comet""BMX""Burrito""Camper""Marquis""Baggage""Dozer""Maverick""News Chopper""Rancher",
"FBI Rancher""Virgo""Greenwood""Jetmax""Hotring""Sandking""Blista Compact""Police Maverick",
"Boxvillde""Benson""Mesa""RC Goblin""Hotring Racer A""Hotring Racer B""Bloodring Banger""Rancher",
"Super GT""Elegant""Journey""Bike""Mountain Bike""Beagle""Cropduster""Stunt""Tanker""Roadtrain",
"Nebula""Majestic""Buccaneer""Shamal""Hydra""FCR-900""NRG-500""HPV1000""Cement Truck""Tow Truck",
"Fortune""Cadrona""FBI Truck""Willard""Forklift""Tractor""Combine""Feltzer""Remington""Slamvan",
"Blade""Freight""Streak""Vortex""Vincent""Bullet""Clover""Sadler""Firetruck""Hustler""Intruder",
"Primo""Cargobob""Tampa""Sunrise""Merit""Utility""Nevada""Yosemite""Windsor""Monster""Monster",
"Uranus""Jester""Sultan""Stratium""Elegy""Raindance""RC Tiger""Flash""Tahoma""Savanna""Bandito",
"Freight Flat""Streak Carriage""Kart""Mower""Dune""Sweeper""Broadway""Tornado""AT-400""DFT-30",
"Huntley""Stafford""BF-400""News Van""Tug""Trailer""Emperor""Wayfarer""Euros""Hotdog""Club",
"Freight Box""Trailer""Andromada""Dodo""RC Cam""Launch""Police Car""Police Car""Police Car",
"Police Ranger""Picador""S.W.A.T""Alpha""Phoenix""Glendale""Sadler""Luggage""Luggage""Stairs",
"Boxville""Tiller""Utility Trailer"
};
main()
{
    print(
"\n----------------------------------");
    print(
" Blank Gamemode by your name here");
    print(
"----------------------------------\n");
}
public 
OnGameModeInit()
{
    
// Don't use these lines if it's a filterscript
    
SetGameModeText("°°[IkS]Maps~Assassin~Dm°°");
    return 
1;
}
public 
OnGameModeExit()
{
    return 
1;
}
public 
OnPlayerRequestClass(playeridclassid)
{
    
SetPlayerPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraPos(playerid1958.37831343.157215.3746);
    
SetPlayerCameraLookAt(playerid1958.37831343.157215.3746);
    return 
1;
}
public 
OnPlayerConnect(playerid)
{
SendClientMessage(playeridCOLOR_VERDE"Benvenuto nel server [IkS]!");
SendClientMessage(playeridCOLOR_ROSSO"Questo и il clan [IkS]!");
SendClientMessage(playeridCOLOR_GIALLO"Visitate il nostro forum ");
SendClientMessage(playeridCOLOR_BLU"http://iks-sampclan.forumfree.it/");
SendClientMessage(playeridCOLOR_BLUCHIARO"venite in tanti !!");
SendClientMessage(playeridCOLOR_ARANCIONE"digita /comandi per sapere tutti i comandi utilizabili");
SendClientMessage(playeridCOLOR_VERDECHIARO"digita /cheter per segnalare un player");
SendClientMessage(playeridCOLOR_ROSSOSCURO"Buona permanenza");
GameTextForPlayer(playerid"~r~Benvenuto ~w~nel ~g~Server",3000,5);
    return 
1;
}
public 
OnPlayerDisconnect(playeridreason)
{
    return 
1;
}
public 
OnPlayerSpawn(playerid)
{
PlayerPlaySound(playerid,1184,0.0,0.0,0.0);
    return 
1;
}
public 
OnPlayerDeath(playeridkilleridreason)
{
GameTextForPlayer(playerid,"~v~LoL ~w~sEI ~r~MortO!"20002);
    return 
1;
}
public 
OnVehicleSpawn(vehicleid)
{
    return 
1;
}
public 
OnVehicleDeath(vehicleidkillerid)
{
    return 
1;
}
public 
OnPlayerText(playeridtext[])
{
    return 
1;
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
if (
strcmp("/ammunation"cmdtexttrue10) == 0)
{
SetPlayerPos(playerid2155.9624943.339710.8203);
ResetPlayerWeapons(playerid);
new 
name[MAX_PLAYER_NAME], string[256];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string), "%s и andato al ammunation per rifornirsi(/ammunation)."name);
SendClientMessageToAll(COLOR_VERDEstring);
SendClientMessage(playeridCOLOR_VERDE"Qui ti potrai rifornire comprando armi");
if (
strcmp("/dm1"cmdtexttrue10) == 0)
{
SetPlayerPos(playerid, -2315.573,1542.46318.77344);
ResetPlayerWeapons(playerid);
new 
pern[256];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string), "%s и andato al dm2 (/dm2)."name);
SendClientMessageToAll(COLOR_GIALLOstring);
if (
strcmp("/dm2"cmdtexttrue10) == 0)
{
SetPlayerPos(playerid, -2159 949 ,  -391 35 33594);
ResetPlayerWeapons(playerid);
new 
nam[256];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string), "%s и andato al dm3 (/dm3)."name);
SendClientMessageToAll(COLOR_GIALLOstring);
if (
strcmp("/dm3"cmdtexttrue10) == 0)
{
SetPlayerPos(playerid2689.984 , -1694.918 9.959698);
ResetPlayerWeapons(playerid);
new 
nae[256];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string), "%s и andato al dm4 (/dm4)."name);
SendClientMessageToAll(COLOR_GIALLOstring);
if (
strcmp("/chiliad"cmdtexttrue10) == 0)
{
SetPlayerPos(playerid, -2320 379 , -1663 738 483 2888);
ResetPlayerWeapons(playerid);
new 
nme[256];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string), "%s и andato al monte chiliad (/chiliad)."name);
SendClientMessageToAll(COLOR_VERDEstring);
SendClientMessage(playeridCOLOR_VERDE" sei in alto !! , meglio che ti prendi un paracadute (/paracadute)");
if (
strcmp("/lb"cmdtexttrue10) == 0)
{
SetPlayerPos(playerid, -764.32 464.1 1366.827 );
ResetPlayerWeapons(playerid);
new 
nage[256];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string), "%s и andato a liberty city (/lb)."name);
SendClientMessageToAll(COLOR_VERDEstring);
if (
strcmp("/shamal"cmdtexttrue10) == 0)
{
SetPlayerPos(playerid32 1199 602 );
ResetPlayerWeapons(playerid);
new 
beh[256];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string), "%s и andato all'interno dello shamal (/shamal)."name);
SendClientMessageToAll(COLOR_VERDEstring);
SendClientMessage(playeridCOLOR_VERDE"meglio che ti prendi un paracadute (/paracadute)");
if (
strcmp("/ganton"cmdtexttrue10) == 0)
{
SetPlayerPos(playerid2493 159 , -1687 13 51347 );
ResetPlayerWeapons(playerid);
new 
bello[256];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string), "%s и andato al ganton , in casa Jhon (/ganton)."name);
SendClientMessageToAll(COLOR_VERDEstring);
if (
strcmp("/bridge"cmdtexttrue10) == 0)
{
SetPlayerPos(playerid, -2684 893 1242 324 55 42969 );
ResetPlayerWeapons(playerid);
new 
setme[256];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string), "%s и andato al gante bridge (/bridge)."name);
SendClientMessageToAll(COLOR_VERDEstring);
if (
strcmp("/ferrisweel"cmdtexttrue10) == 0)
{
SetPlayerPos(playerid368 3753 , -2029 625 671875 );
ResetPlayerWeapons(playerid);
new 
buhg[256];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string), "%s и andato al ferrisweel (/ferrisweel)."name);
SendClientMessageToAll(COLOR_VERDEstring);
if (
strcmp("/lv"cmdtexttrue10) == 0)
{
SetPlayerPos(playerid2027.08251008.301110.8203);
ResetPlayerWeapons(playerid);
new 
ghj[256];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string), " %s и andato a lv /lv."name);
SendClientMessageToAll(COLOR_VERDEstring);
if (
strcmp("/ls"cmdtexttrue10) == 0)
{
SetPlayerPos(playerid2495.1101 ,-1687.526213.5151);
ResetPlayerWeapons(playerid);
new 
perno[256];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string), " %s и andato a ls /ls."name);
SendClientMessageToAll(COLOR_VERDEstring);
if (
strcmp("/villa"cmdtexttrue10) == 0)
{
SetPlayerPos(playerid, -2661 1413 97 922 1953);
ResetPlayerWeapons(playerid);
new 
gghh[256];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string), " %s и andato alla villa admin !."name);
SendClientMessageToAll(COLOR_ARANCIONEstring);
if (
strcmp("/iks_|"cmdtexttrue10) == 0)
{
SetPlayerPos(playerid223.431976 1872.400268 13.734375);
ResetPlayerWeapons(playerid);
new 
namertfh[256];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string), " %s и andato alla base [IkS] ."name);
SendClientMessageToAll(COLOR_ROSSOstring);
SendClientMessage(playeridCOLOR_ROSSO"Sei nella base militare [IkS]!!");
GivePlayerWeapon(playerid17,40);
SendClientMessage(playeridCOLOR_GIALLO"Hai ricevuto un tear gas , per difenderla !!");
if(
strcmp(cmdtext"/tele"true) == 0)
SendClientMessage(playeridCOLOR_VERDE"|__________________ Tele (/tele) _________________|");
SendClientMessage(playeridCOLOR_GIALLO"/dm [1-4]");
SendClientMessage(playeridCOLOR_GIALLO"/dmspecial");
SendClientMessage(playeridCOLOR_GIALLO"/chiliad");
SendClientMessage(playeridCOLOR_GIALLO"/lb");
SendClientMessage(playeridCOLOR_GIALLO"/lv");
SendClientMessage(playeridCOLOR_GIALLO"/shamal");
SendClientMessage(playeridCOLOR_GIALLO"/ganton");
SendClientMessage(playeridCOLOR_GIALLO"/bridge");
SendClientMessage(playeridCOLOR_GIALLO"/ferrisweel");
SendClientMessage(playeridCOLOR_GIALLO"/ls");
SendClientMessage(playeridCOLOR_VERDE"|__________________________________________________|");
if(
strcmp(cmdtext"/comandi"true) == 0)
SendClientMessage(playeridCOLOR_VERDE"|__________________ Comandi (/comandi) ______________|");
SendClientMessage(playeridCOLOR_GIALLO"digita /tele per vedere tutti i teletrasporti");
SendClientMessage(playeridCOLOR_GIALLO"digita /armi per vedere tutti le armi spawnabili");
SendClientMessage(playeridCOLOR_GIALLO"digita /regolamento per vedere le regole del server");
SendClientMessage(playeridCOLOR_GIALLO"digita /info-ikk per conoscere informazioni sui ikk");
SendClientMessage(playeridCOLOR_GIALLO"digitare /arruolamenti per arruolarti");
SendClientMessage(playeridCOLOR_GIALLO"digita /pm per madare un messaggio privato");
SendClientMessage(playeridCOLOR_GIALLO"digita /kill per suicidarti");
SendClientMessage(playeridCOLOR_GIALLO"digita /disarm per autodisarmarti");
SendClientMessage(playeridCOLOR_GIALLO"digita /infospawn per sapere come spawnare veicoli");
SendClientMessage(playeridCOLOR_GIALLO"digita /cheter per segnalare un player");
SendClientMessage(playeridCOLOR_GIALLO"|__________________________________________________|");
if(
strcmp(cmdtext"/regolamento"true) == 0)
SendClientMessage(playeridCOLOR_VERDE"|__________________ Regolamento (/regolamento) ___________|");
SendClientMessage(playeridCOLOR_GIALLO"1)Non usare cheats");
SendClientMessage(playeridCOLOR_GIALLO"2)Non flodd/spam");
SendClientMessage(playeridCOLOR_GIALLO"3)Non insultare player , membri del clan o admin");
SendClientMessage(playeridCOLOR_GIALLO"4)Non usare armi nelle zone drift");
SendClientMessage(playeridCOLOR_VERDE"|_____________________________________________________|");
if(
strcmp(cmdtext"/regolamento"true) == 0)
SendClientMessage(playeridCOLOR_VERDE"|__________________ Armi (/armi) _________________________|");
SendClientMessage(playeridCOLOR_GIALLO"/sawn , /mp5 , /knife , /grenade , /desert , /tec9");
SendClientMessage(playeridCOLOR_GIALLO"/silenced , /m4 , /satchel , /micro , /chainsaw");
SendClientMessage(playeridCOLOR_VERDE"|_____________________________________________________|");
if(
strcmp(cmdtext"/info-iks"true) == 0)
SendClientMessage(playeridCOLOR_ARANCIONE"Il server и nuovo !!");
SendClientMessage(playeridCOLOR_ROSSO"Il founder и [IkS]Ter[mi]n4tor [lv5]");
SendClientMessage(playeridCOLOR_VERDE"__________________________________");
SendClientMessage(playeridCOLOR_GIALLO"gli admin sono [IkS]Ip[er]space [lv3]");
SendClientMessage(playeridCOLOR_VERDE"___________________________________");
SendClientMessage(playeridCOLOR_BLU"per arruolarsi digitare /arruolamenti");
SendClientMessage(playeridCOLOR_BLUCHIARO"questo и tutto sugli [IkS]");
if(
strcmp(cmdtext"/arruolamenti"true) == 0)
SendClientMessage(playeridCOLOR_VERDE"|______________ Arruolamenti (/arruolamenti) ______________|");
SendClientMessage(playeridCOLOR_GIALLO"Condizioni per arruolarsi :");
SendClientMessage(playeridCOLOR_BLU"Avere conoscenze sul dm");
SendClientMessage(playeridCOLOR_BLU"Fare amicizia con i membri del clan");
SendClientMessage(playeridCOLOR_BLU"Non insultare");
SendClientMessage(playeridCOLOR_BLU"Essere registarto sul forum");
SendClientMessage(playeridCOLOR_GIALLO"_-_-_-_-_°[Spiegazione]°-_-_-_-_-_-_");
SendClientMessage(playeridCOLOR_BLU"L'arruolamento consiste in un test suddiviso in due prove:");
SendClientMessage(playeridCOLOR_BLU"DM : dovrai affrontare il founder , con armi cw e armi normali");
SendClientMessage(playeridCOLOR_BLU"TEST TEORICO : dovrai rispondere a 5 domande su samp nel forum");
SendClientMessage(playeridCOLOR_VERDE"|__________________________________________________________|");
if(
strcmp(cmdtext"/infospawn"true) == 0)
SendClientMessage(playeridCOLOR_VERDE"|___________________ Spawn (/infospawn) ________________|");
SendClientMessage(playeridCOLOR_GIALLO"Per spawnare un veicolo digita :");
SendClientMessage(playeridCOLOR_GIALLO"/car [nome veicolo]");
SendClientMessage(playeridCOLOR_VERDE"________________________________________________________|");
if(
strcmp(cmdtext"/login samp4ever24"true) == 0)
SendClientMessage(playeridCOLOR_VERDE"You are logged in as Admin ! (lv1)");
if(
strcmp(cmdtext"/login samp4ever97"true) == 0)
SendClientMessage(playeridCOLOR_VERDE"You are logged in as Admin ! (lv2)");
if(
strcmp(cmdtext"/login samp4ever_95"true) == 0)
SendClientMessage(playeridCOLOR_VERDE"You are logged in as Admin ! (lv3)");
if(
strcmp(cmdtext"/login samp4ever_97"true) == 0)
SendClientMessage(playeridCOLOR_VERDE"You are logged in as Admin ! (lv4)");
if(
strcmp(cmdtext"/login samp4ever_|_|"true) == 0)
SendClientMessage(playeridCOLOR_VERDE"You are logged in as Admin ! (lv5)");
if(
strcmp(cmdtext"/cheter"true) ==0)
SendClientMessage(playeridCOLOR_ROSSO"Segnala il nome del cheter , esso verrа riferito al founder");
SendClientMessage(playeridCOLOR_ROSSO"Scrivi il nome del cheter");
SendClientMessageToAll(COLOR_GIALLO"**Warning** °°Cheter segnalato in game°°");
SendClientMessageToAll(COLOR_GIALLO"Il cheter segnlato tolga immediatamento i cheats");
SendClientMessageToAll(COLOR_GIALLO"pena : KIK|BAN");
if(
strcmp(cmdtext"/sawn"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_GIALLO"Hai ricevuto un sawn");
      
GivePlayerWeapon(playerid26,550);
if(
strcmp(cmdtext"/mp5"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_GIALLO"Hai ottenuto un mp5");
      
GivePlayerWeapon(playerid29,5000);
if(
strcmp(cmdtext"/knife"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_GIALLO"Hai ottenuto un coltello");
      
GivePlayerWeapon(playerid4,1000);
if(
strcmp(cmdtext"/grenade"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_GIALLO"Hai ottenuto delle granate");
      
GivePlayerWeapon(playerid16,50);
if(
strcmp(cmdtext"/desert"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_GIALLO" Hai ottenuto una desert");
      
GivePlayerWeapon(playerid24,5000);
if(
strcmp(cmdtext"/silenced"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_GIALLO"Hai ottenuto una 9mm silenziata");
      
GivePlayerWeapon(playerid23,5000);
if(
strcmp(cmdtext"/combat"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_GIALLO"Hai ottenuto un combat ");
      
GivePlayerWeapon(playerid27,700);
if(
strcmp(cmdtext"/gas_|"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_GIALLO"Hai ottenuto un Tear Gas (*arma del clan*)");
      
GivePlayerWeapon(playerid17,55);
if(
strcmp(cmdtext"/m4"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_GIALLO"Hai ottenuto un m4");
      
GivePlayerWeapon(playerid31,9000);
if(
strcmp(cmdtext"/minigun_|1"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_ROSSO"Hai ottenuto un minigun (*arma admin*)");
      
GivePlayerWeapon(playerid38,9999);
if(
strcmp(cmdtext"/satchel"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_GIALLO"Hai ottenuto un satchel");
      
GivePlayerWeapon(playerid39,3000);
if(
strcmp(cmdtext"/lanciamissili_|"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_GIALLO"Hai ottenuto un lanciamissili (*arma del clan*)");
      
GivePlayerWeapon(playerid35,200);
if(
strcmp(cmdtext"/lanciamissilihs_|1"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_ROSSO"Hai ottenuto un lanciamissili HS (*arma admin*)");
      
GivePlayerWeapon(playerid23,5000);
if(
strcmp(cmdtext"/paracadute"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_GIALLO"Hai ottenuto un paracadute");
      
GivePlayerWeapon(playerid46,2);
if(
strcmp(cmdtext"/tec9"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_GIALLO"Hai ottenuto un tec9");
      
GivePlayerWeapon(playerid32,8000);
if(
strcmp(cmdtext"/sniper_|1"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_GIALLO"Hai ottenuto un fucile a precisione (*arma admin*)");
      
GivePlayerWeapon(playerid34,60);
if(
strcmp(cmdtext"/micro"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_GIALLO"Hai ottenuto un micro SMG");
      
GivePlayerWeapon(playerid28,8000);
if(
strcmp(cmdtext"/chainsaw"true) == 0)
      {
      
SendClientMessage(playeridCOLOR_GIALLO"Hai ottenuto una motosega");
      
GivePlayerWeapon(playerid9,2);
if(
strcmp(cmdtext"/vita"true) == 0)
{
SetPlayerHealth(playerid,1000);
SendClientMessage(playeridCOLOR_ARANCIONE"ti sei ricaricato la vita");
if(
strcmp(cmdtext"armatura_|"true) ==0)
{
SetPlayerArmour(playerid,1000);
SendClientMessage(playeridCOLOR_ARANCIONE"hai indossato un armatura");
if(
strcmp(cmdtext"score_1"true) ==0)
{
SetPlayerScore(playerid1000000);
SendClientMessage(playeridCOLOR_ARANCIONE"hai ricevuto delle score");
if (
strcmp("/dmspecial"cmdtexttrue10) == 0)
SetPlayerPos(playerid, -768.7932,1557.3037,27.1172);
SetPlayerFacingAngle(playerid269.4232);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid249999);
GivePlayerWeapon(playerid299999);
new 
stringa[256];
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string), "^^^ %s и andato al  DM Special (/dmspecial)"name);
SendClientMessageToAll(COLOR_GIALLOstring);
SendClientMessage(playerid,COLOR_VERDE"Hai ricevuto una desert e mp5 , area allenamento armi cw !!");
SendClientMessage(playerid,COLOR_VERDE"Tutte le altre armi , qui , sono vietate !!");
if (
strcmp("/disarm"cmdtexttrue10) == 0)
ResetPlayerWeapons(playerid);
GetPlayerName(playeridnamesizeof(name));
format(stringsizeof(string), "^^^ %s si и autodisarmato (/disarm)"name);
SendClientMessageToAll(COLOR_ARANCIONEstring);
if (
strcmp("/kill" cmdtexttrue)==0)
SetPlayerHealth(playerid0);
    new 
cmd[256], idx;
    
cmd strtok(cmdtextidx);
    if(
strcmp(cmd"/noarmatura_|"true) == 0)
    {
        
SetPlayerArmour(playerid,0);
        
SendClientMessage(playeridCOLOR_VERDE"Hai tolto l'armatura");
}
strtok(const string[], &index)
{
    new 
length strlen(string);
    while((
index length) && (string[index] <= ' '))
    {
        
index++;
    }
    new 
offset index;
    new 
result[20];
    while ((
index length) && (string[index] > ' ') && ((index offset) < (sizeof(result) - 1)))
    {
        
result[index offset] = string[index];
        
index++;
    }
    
result[index offset] = EOS;
    return 
result;
}
if(
strcmp(cmdtext"/car"true) == 0)
{
if(
IsPlayerConnected(playerid))
{
tmp strtok(cmdtextidx);
if(!
strlen(tmp))
{
SendClientMessage(playeridCOLOR_ROSSO"USAGE: /car [id/nome] [colore1] [colore2]");
return 
1;
}
new 
car;
car strvalEx(tmp);
if(!
IsNumeric(tmp)) car GetVehicleModelIDFromName(tmp); else car strval(tmp);
if(
car 400 || car 611)
{
SendClientMessage(playeridCOLOR_GREY"ID/Nome non valido!");
return 
1;
}
tmp strtok(cmdtextidx);
if(!
strlen(tmp))
tmp random(128);
new 
color1;
color1 strvalEx(tmp);
tmp strtok(cmdtextidx);
if(!
strlen(tmp))
tmp=random(128);
new 
color2;
color2 strvalEx(tmp);
new 
Float:X,Float:Y,Float:Z,Float:D;
GetPlayerPos(playeridX,Y,Z);
GetPlayerFacingAngle(playeridD);
new 
CreateVehicle(carX,Y,ZDcolor1color260000);
SetTimerEx("Respawn"100000"ii"vplayerid);
PutPlayerInVehicle(playeridv0);
SetPlayerInterior(playerid0);
dmspawn[playerid] = 0;
SendClientMessage(playeridCOLOR_VERDE"Veicolo spawnato!");
    new 
cmd[128], idx;
    
cmd strtok(cmdtextidx);
    if(
strcmp(cmd"/kick_|"true) == 0)
    {
        new 
tmp[128];
        
tmp strtok(cmdtextidx);
        if(
strlen(tmp) == 0) return SendClientMessage(playerid0xFFFFFFFF"USAGE: /kick [playerid]");
        
Kick(strval(tmp));
}
return 
1;
    }
    return 
0
Reply
#7

Okay then, you should add to every command the brackets as I shown you above, otherwise it'll give you errors.
Reply
#8

You can correct them. please?
Reply
#9

Err, I've tried, but as soon as I correct something, another error comes out. That's what I got now:

Код:
txt.pwn(161) : warning 202: number of arguments does not match definition
txt.pwn(161) : warning 202: number of arguments does not match definition
txt.pwn(161) : warning 202: number of arguments does not match definition
txt.pwn(182) : warning 202: number of arguments does not match definition
txt.pwn(182) : warning 202: number of arguments does not match definition
txt.pwn(182) : warning 202: number of arguments does not match definition
txt.pwn(193) : warning 202: number of arguments does not match definition
txt.pwn(193) : warning 202: number of arguments does not match definition
txt.pwn(203) : warning 202: number of arguments does not match definition
txt.pwn(203) : warning 202: number of arguments does not match definition
txt.pwn(203) : warning 202: number of arguments does not match definition
txt.pwn(213) : warning 202: number of arguments does not match definition
txt.pwn(213) : warning 202: number of arguments does not match definition
txt.pwn(213) : warning 202: number of arguments does not match definition
txt.pwn(243) : warning 202: number of arguments does not match definition
txt.pwn(243) : warning 202: number of arguments does not match definition
txt.pwn(258) : error 017: undefined symbol "COLOR_ROSSO"
txt.pwn(259) : error 017: undefined symbol "COLOR_ROSSO"
txt.pwn(317) : error 017: undefined symbol "COLOR_ROSSO"
txt.pwn(321) : error 017: undefined symbol "COLOR_BLU"
txt.pwn(322) : error 017: undefined symbol "COLOR_BLUCHIARO"
txt.pwn(329) : error 017: undefined symbol "COLOR_BLU"
txt.pwn(330) : error 017: undefined symbol "COLOR_BLU"
txt.pwn(331) : error 017: undefined symbol "COLOR_BLU"
txt.pwn(332) : error 017: undefined symbol "COLOR_BLU"
txt.pwn(334) : error 017: undefined symbol "COLOR_BLU"
txt.pwn(335) : error 017: undefined symbol "COLOR_BLU"
txt.pwn(336) : error 017: undefined symbol "COLOR_BLU"
txt.pwn(375) : error 017: undefined symbol "COLOR_ROSSO"
txt.pwn(376) : error 017: undefined symbol "COLOR_ROSSO"
txt.pwn(438) : error 017: undefined symbol "COLOR_ROSSO"
txt.pwn(456) : error 017: undefined symbol "COLOR_ROSSO"
txt.pwn(516) : error 017: undefined symbol "name"
txt.pwn(516) : error 017: undefined symbol "name"
txt.pwn(516) : error 029: invalid expression, assumed zero
txt.pwn(516) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


20 Errors.
I advice you to read something on the SA-MP wiki, it will help you a lot.
Reply
#10

Try to correct the coordinates placed the warnings are bad, but the other errors you correct them.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)