PDA

View Full Version : error fs


fireboy
04/10/2012, 09:47 AM
hello, can somebody help me with script?

http://pastebin.com/L5epfCsj

when i compile it send me this:

D:\Documents and Settings\abc\Desktop\Serveris\Conex SA-MP\filterscripts\poke.pwn(95) : warning 217: loose indentation
D:\Documents and Settings\abc\Desktop\Serveris\Conex SA-MP\filterscripts\poke.pwn(101) : warning 217: loose indentation
D:\Documents and Settings\abc\Desktop\Serveris\Conex SA-MP\filterscripts\poke.pwn(104) : warning 217: loose indentation
D:\Documents and Settings\abc\Desktop\Serveris\Conex SA-MP\filterscripts\poke.pwn(260) : warning 217: loose indentation
D:\Documents and Settings\abc\Desktop\Serveris\Conex SA-MP\filterscripts\poke.pwn(354) : warning 217: loose indentation
D:\Documents and Settings\abc\Desktop\Serveris\Conex SA-MP\filterscripts\poke.pwn(366) : warning 217: loose indentation
D:\Documents and Settings\abc\Desktop\Serveris\Conex SA-MP\filterscripts\poke.pwn(385) : warning 217: loose indentation
D:\Documents and Settings\abc\Desktop\Serveris\Conex SA-MP\filterscripts\poke.pwn(399) : error 030: compound statement not closed at the end of file (started at line 373)
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


1 Error.

big thank you.

Scrillex
04/10/2012, 09:54 AM
line 95.
if (strcmp("/buylevel", cmdtext, true) == 0)
{
if(GetPlayerScore(playerid)==0)
{
if(GetPlayerMoney(playerid) < 1000000)//
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 1. li-meni!");
}
else
{
SetPlayerScore(playerid, 1);
GivePlayerMoney(playerid, -1000000);//
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Ju-s iega-da-ja-ties 1. Li-meni. Tagad jums ir iespe-ja lietot /repair, lai salabotu mas(i-nu nekur nebraucot!");
}
return 1;
}
}

mamorunl
04/10/2012, 09:58 AM
Loose indentation: The indentation of your code is not compliant with the way the compiler expects it to be. The solution to this is to indent your code properly.

Compound statement not closed at the end of file: Somewhere in your code you are missing a closing fish hook ( } ).

Scrillex
04/10/2012, 10:14 AM
if (strcmp("/buylevel", cmdtext, true) == 0)
{
if(GetPlayerScore(playerid)==0)
{
if(GetPlayerMoney(playerid) < 1000000)//
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 1. li-meni!");
}

else
{
SetPlayerScore(playerid, 1);
GivePlayerMoney(playerid, -1000000);//
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Ju-s iega-da-ja-ties 1. Li-meni. Tagad jums ir iespe-ja lietot /repair, lai salabotu mas(i-nu nekur nebraucot!");
}
return 1;
}
//2.lvl
if(GetPlayerScore(playerid)==1)
{
if(GetPlayerMoney(playerid) < 2000000)//Nauda
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 2. līmeni!");
}
else
{
SetPlayerScore(playerid, 2);
GivePlayerMoney(playerid, -2000000);//Nauda.....
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Jūs iegādājāties 2. Līmeni. Tagad jums ir iespēja lietot /flip komandu!");
}
return 1;
}
//3.lvl
if(GetPlayerScore(playerid)==2)
{
if(GetPlayerMoney(playerid) < 3000000)
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 3. līmeni!");
}
else
{
SetPlayerScore(playerid, 3);
GivePlayerMoney(playerid, -3000000);
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Jūs iegādājāties 3. Līmeni. Tagad jums ir iespēja lietot /lock un /unlock komandu, lai aizslēgtu un atslēgtu mašīnu!");
}
return 1;
}
//4.lvl
if(GetPlayerScore(playerid)==3)
{
if(GetPlayerMoney(playerid) < 4)
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 4. līmeni!");
}
else
{
SetPlayerScore(playerid, 4);
GivePlayerMoney(playerid, -4);
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Jūs iegādājāties 4. Līmeni. Tagad jums ir iespēja lietot /savecar un /getcar komandu, lai izsauktu jūsu saglabāto mašīnu!");
}
return 1;
}
//5.lvl
if(GetPlayerScore(playerid)==4)
{
if(GetPlayerMoney(playerid) < 5)
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 5. līmeni!");
}
else
{
SetPlayerScore(playerid, 5);
GivePlayerMoney(playerid, -5);
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Jūs iegādājāties 5. Līmeni. Tagad jums ir iespēja lietot /tune komandu, lai uztūnētu mašīnu nekur nebraucot!");
}
return 1;
}
//6.lvl
if(GetPlayerScore(playerid)==5)
{
if(GetPlayerMoney(playerid) < 6)
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 6. līmeni!");
}
else
{
SetPlayerScore(playerid, 6);
GivePlayerMoney(playerid, -6);
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Jūs iegādājāties 6. Līmeni. Tagad jums ir iespēja lietot /afon un /afoff komandu, lai ieslēgtu un izslēgtu antifall!");
}
return 1;
}
//7.lvl
if(GetPlayerScore(playerid)==6)
{
if(GetPlayerMoney(playerid) < 7)
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 7. līmeni!");
}
else
{
SetPlayerScore(playerid, 7);
GivePlayerMoney(playerid, -7);
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Jūs iegādājāties 7. Līmeni. Tagad jums ir iespēja lietot /count komandu, lai ieslēgtu laika atskaiti!");
}
return 1;
}
//8.lvl
if(GetPlayerScore(playerid)==7)
{
if(GetPlayerMoney(playerid) < 8)
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 8. līmeni!");
}
else
{
SetPlayerScore(playerid, 8);
GivePlayerMoney(playerid, -8);
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Jūs iegādājāties 8. Līmeni. Tagad jums nospawnojoties būs bruņas!");
}
return 1;
}
//9.lvl
if(GetPlayerScore(playerid)==8)
{
if(GetPlayerMoney(playerid) < 9)
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 9. līmeni!");
}
else
{
SetPlayerScore(playerid, 9);
GivePlayerMoney(playerid, -9);
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Jūs iegādājāties 9. Līmeni. Tagad jums ir iespēja lietot /parachute komandu, lai paņemtu izpletni!");
}
return 1;
}
//10.lvl
if(GetPlayerScore(playerid)==9)
{
if(GetPlayerMoney(playerid) < 10)
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 10. līmeni!");
}
else
{
SetPlayerScore(playerid, 10);
GivePlayerMoney(playerid, -10);
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Jūs iegādājāties 10. Līmeni. Tagad jums ir iespēja lietot /neons komandu, lai ievietotu mašīnā neonus!");
}
return 1;
}
//11.lvl
if(GetPlayerScore(playerid)==10)
{
if(GetPlayerMoney(playerid) < 11)
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 10. līmeni!");
}
else
{
SetPlayerScore(playerid, 11);
GivePlayerMoney(playerid, -10);
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Jūs iegādājāties 10. Līmeni. Tagad jums ir iespēja lietot /neons komandu, lai ievietotu mašīnā neonus!");
}
return 1;
}
//12.lvl
if(GetPlayerScore(playerid)==11)
{
if(GetPlayerMoney(playerid) < 12)
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 9. līmeni!");
}
else
{
SetPlayerScore(playerid, 12);
GivePlayerMoney(playerid, -12);
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Jūs iegādājāties 9. Līmeni. Tagad jums ir iespēja lietot /parachute komandu, lai paņemtu izpletni!");
}
return 1;
}
//13.lvl
if(GetPlayerScore(playerid)==12)
{
if(GetPlayerMoney(playerid) < 13)
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 9. līmeni!");
}
else
{
SetPlayerScore(playerid, 13);
GivePlayerMoney(playerid, -13);
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Jūs iegādājāties 9. Līmeni. Tagad jums ir iespēja lietot /parachute komandu, lai paņemtu izpletni!");
}
return 1;
}
//14.lvl
if(GetPlayerScore(playerid)==13)
{
if(GetPlayerMoney(playerid) < 14)
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 9. līmeni!");
}
else
{
SetPlayerScore(playerid, 14);
GivePlayerMoney(playerid, -14);
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Jūs iegādājāties 9. Līmeni. Tagad jums ir iespēja lietot /parachute komandu, lai paņemtu izpletni!");
}
return 1;
}
//15.lvl
if(GetPlayerScore(playerid)==14)
{
if(GetPlayerMoney(playerid) < 15)
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 9. līmeni!");
}
else
{
SetPlayerScore(playerid, 15);
GivePlayerMoney(playerid, -15);
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Jūs iegādājāties 9. Līmeni. Tagad jums ir iespēja lietot /parachute komandu, lai paņemtu izpletni!");
}
return 1;
}
//16.lvl
if(GetPlayerScore(playerid)==15)
{
if(GetPlayerMoney(playerid) < 16)
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 9. līmeni!");
}
else
{
SetPlayerScore(playerid, 16);
GivePlayerMoney(playerid, -16);
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Jūs iegādājāties 9. Līmeni. Tagad jums ir iespēja lietot /parachute komandu, lai paņemtu izpletni!");
}
return 1;
}
//17.lvl
if(GetPlayerScore(playerid)==16)
{
if(GetPlayerMoney(playerid) < 17)
{
SendClientMessage(playerid, 0xE6000033, "Jums nav pietiekami daudz naudas, lai nopirktu 9. līmeni!");
}
else
{
SetPlayerScore(playerid, 17);
GivePlayerMoney(playerid, -17);
SendClientMessage(playerid, 0x33AA33AA, "Apsveicam! Jūs iegādājāties 9. Līmeni. Tagad jums ir iespēja lietot /parachute komandu, lai paņemtu izpletni!");
}
}
return 1;
}
//===========================LIIMENU KOMANDAS========================================== ==================//
//================================================== ================================================== =================//
//1.LĪMENIS
if(GetPlayerScore(playerid) >= 1)
{
if(!strcmp(cmdtext, "/repaircar", true, 4))
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "KĻŪDA:Tev jābūt mašīnā!");
{
new vehicleid = GetPlayerVehicleID(playerid);
SetVehicleHealth(vehicleid, 1000.0);
SendClientMessage(playerid, 0x00CC00FF, "Tava mašīna salabota!");
}
return 1;
}
}
//================================================== ================================================== ===============//
//2.LĪMENIS
if(GetPlayerScore(playerid) >= 2)
{
if(!strcmp(cmdtext, "/flipcar", true, 4))
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "KĻŪDA: Tev jābūt mašīnā!");
{
new currentveh;
new Float:angle;
currentveh = GetPlayerVehicleID(playerid);
GetVehicleZAngle(currentveh, angle);
SetVehicleZAngle(currentveh, angle);
SendClientMessage(playerid, 0xFFFFFFFF, "Tava mašīna veiksmīgi apgriezta.");
}
}
return 1;
}
All code.. Just next time see if your code is organized.... You just copy pasted it....

mamorunl
04/10/2012, 10:21 AM
Brace...

Then what do you call the round bracets? I like fish hook :D

xMCx
04/10/2012, 10:22 AM
use #pargma tabsize 0//to get rid of those warnings
and #endif//to end the if you started

Scrillex
04/10/2012, 10:23 AM
Not needed to use them.. Just was messy code thats all! All errors are gone now and everything is fine :)

CmZxC
04/10/2012, 01:37 PM
No don't use that, that doesn't fix ANYTHING, just tells the compiler to ignore major problems in your code.

Finally, someone saying this.

Also its spelled #pragma not #pargma.

gtakillerIV
09/10/2012, 07:00 PM
Why not make a rule that says you are not allowed to tell people to use #pragma size 0 ?

Sorry for the off topic but I see this is going in a bad way.