[LA-RP]Command Error.
#1

Pastebin: http://pastebin.com/m14009987 || or this way.....
Код:
//----------------------SEX SHOP /SEXBUY-------------------//
	if(strcmp(cmd, "/sexbuy", true) == 0)
  {
  	if(IsPlayerConnected(playerid))
  	{
     if(IsAtSexShop(playerid))
	    {
	     tmp = strtok(cmdtext, idx);
       if(!strlen(tmp))
	     {
				 SendClientMessage(playerid, COLOR_DONATE, "To buy a Sex-Toy, use /buy list, then /buy [SEX-TOY-ID]");
				 return 1;
       }
	     if(strcmp(tmp,"list",true) == 0)
  	     {
				  SendClientMessage(playerid, COLOR_DONATE, "_________Sex Toy IDS:_________");
				  SendClientMessage(playerid, COLOR_DONATE, "1: Purple Double-ended ($250)  2: Small Vibrator ($100)");
				  SendClientMessage(playerid, COLOR_DONATE, "3: Long Vibrator ($375) 4: White Dildo ($50)");
				  SendClientMessage(playerid, COLOR_DONATE, "5: Cane ($75)      6: Flowers ($80)");
				  return 1;
         }
				 else if(strcmp(tmp,"1",true) == 0)
				 {
 			    SendClientMessage(playerid, COLOR_DONATE, "You bought a Purple Double-Ended Dildo for : $250");
   			  SafeGivePlayerMoney(playerid, -250);
   			  SafeGivePlayerWeapon(playerid, 10 1);
				  return 1;
				 }
				 else if(strcmp(tmp,"2",true) == 0)
				 {
 			    SendClientMessage(playerid, COLOR_DONATE, "You bought a Small Vibrating Dildo for : $100");
   			  SafeGivePlayerMoney(playerid, -100);
   			  SafeGivePlayerWeapon(playerid, 11 1);
				  return 1;
				 }
				 else if(strcmp(tmp,"3",true) == 0)
				 {
 			    SendClientMessage(playerid, COLOR_DONATE, "You bought a Long Vibrating Dildo for : $375");
   			  SafeGivePlayerMoney(playerid, -375);
   			  SafeGivePlayerWeapon(playerid, 12 1);
				  return 1;
				 }
				 else if(strcmp(tmp,"4",true) == 0)
				 {
 			    SendClientMessage(playerid, COLOR_DONATE, "You bought a White Dildo for : $50");
   			  SafeGivePlayerMoney(playerid, -50);
   			  SafeGivePlayerWeapon(playerid, 13 1);
				  return 1;
				 }
				 else if(strcmp(tmp,"5",true) == 0)
				 {
 			    SendClientMessage(playerid, COLOR_DONATE, "You bought a Cane for : $75");
   			  SafeGivePlayerMoney(playerid, -75);
   			  SafeGivePlayerWeapon(playerid, 15 1);
				  return 1;
				 }
				 else if(strcmp(tmp,"6",true) == 0)
				 {
 			    SendClientMessage(playerid, COLOR_DONATE, "You bought a Pair of Flowers for : $80");
   			  SafeGivePlayerMoney(playerid, -80);
   			  SafeGivePlayerWeapon(playerid, 14 1);
				  return 1;
	  	   }
				 else
				 {
				   SendClientMessage(playerid, COLOR_GREEN, "Wrong Sex-Toy-ID, type /buy list");
				   return 1;
				 }
			 else
        {
	       SendClientMessage(playerid, COLOR_GREY, " You are not at the Sex-Shop(Near North-Burger Shot) !");
	       return 1;
				}
			}
   }
	 return 1
}
I use a Anti-cheat system, so it is SAFE-(Weapon,Money,ETC)

I mucked the script up i think, but i don't know where :/

The PAWNO Error i get:

Код:
C:\Users\***\Desktop\larp.pwn(29281) : error 001: expected token: ",", but found "-integer value-"
C:\Users\***\Desktop\larp.pwn(29281) : warning 215: expression has no effect
C:\Users\***\Desktop\larp.pwn(29281) : error 001: expected token: ";", but found ")"
C:\Users\***\Desktop\larp.pwn(29281) : error 029: invalid expression, assumed zero
C:\Users\***\Desktop\larp.pwn(29281) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#2

God..

If it's related to LA-RP, and it is related to LA-RP. So it goes to LA-RP gamemode topic.
Reply
#3

SafeGivePlayerWeapon(playerid, 10 1);
should be
SafeGivePlayerWeapon(playerid, 10, 1);
Reply
#4

Thanks Silent, but now, i also get this error:
Код:
C:\Users\***\Desktop\larp.pwn(29324) : warning 225: unreachable code
C:\Users\***\Desktop\larp.pwn(29324) : error 029: invalid expression, assumed zero
Reply
#5

You're missing a semicolon ';' at the end. Supposed to be behind "return 1"

Also, flowers don't come in 'pairs' they come in 'bouquets'
Reply
#6

Nope, still another error..

Код:
C:\Users\***\Desktop\larp.pwn(29324) : warning 225: unreachable code
C:\Users\***\Desktop\larp.pwn(29324) : error 029: invalid expression, assumed zero
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Reply
#7

Can you give me the line then?
Reply
#8

Код:
				 else if(strcmp(tmp,"6",true) == 0)
				 {
 			    SendClientMessage(playerid, COLOR_DONATE, "You bought a Bouquet of Flowers for : $80");
   			  SafeGivePlayerMoney(playerid, -80);
   			  SafeGivePlayerWeapon(playerid, 14, 1);
				  return 1;
	  	   }
				 else
				 {
				   SendClientMessage(playerid, COLOR_GREEN, "Wrong Sex-Toy-ID, type /buy list");
				   return 1;
			  }
       else        -This is the error line.....
        {
         SendClientMessage(playerid, COLOR_DONATE, " You are not at the Sex-Shop(Near North-Burger Shot) !");
         return 1;
			 	}
		  }
   }
	 return 1;
 }
Reply
#9

the line of which the PAWNO says there is an error, is on the 'else' one.. then it is SendClientMessage "You are not at the sexshop....."
Reply
#10

hello delow
my link is about script error's that i have fixed please add to it and i'll help you with new cmds
i would like to link threads mate http://forum.sa-mp.com/index.php?topic=99916.0
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)