[LA-RP]Command Error. -
delow-music - 29.04.2009
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.
Re: [LA-RP]Command Error. -
MenaceX^ - 29.04.2009
God..
If it's related to LA-RP, and it is related to LA-RP. So it goes to LA-RP gamemode topic.
Re: [LA-RP]Command Error. -
Joe Staff - 29.04.2009
SafeGivePlayerWeapon(playerid, 10 1);
should be
SafeGivePlayerWeapon(playerid, 10, 1);
Re: [LA-RP]Command Error. -
delow-music - 29.04.2009
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
Re: [LA-RP]Command Error. -
Joe Staff - 29.04.2009
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'
Re: [LA-RP]Command Error. -
delow-music - 29.04.2009
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.
Re: [LA-RP]Command Error. -
Joe Staff - 29.04.2009
Can you give me the line then?
Re: [LA-RP]Command Error. -
delow-music - 29.04.2009
Код:
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;
}
Re: [LA-RP]Command Error. -
delow-music - 29.04.2009
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....."
Re: [LA-RP]Command Error. -
Larry_Langley - 29.04.2009
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