SA-MP Forums Archive
error 001: expected token: ",", but found "return" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: error 001: expected token: ",", but found "return" (/showthread.php?tid=519085)



error 001: expected token: ",", but found "return" - KaiserOfGermany - 12.06.2014

this:

if (strcmp("/cmds", cmdtext, true, 10) ==0)
{
SendClientMessage(playerid, 0xFF0000, "deagle kill skin v armour minigun drag lsa home skin help sf race drift");
return 1;

}


Re: error 001: expected token: ",", but found "return" - Faisal_khan - 12.06.2014

Are you sure this is the line and it is not in any of your includes?


Re: error 001: expected token: ",", but found "return" - KaiserOfGermany - 12.06.2014

yes, if you want i can give you gamemode.


Re: error 001: expected token: ",", but found "return" - Faisal_khan - 12.06.2014

Hey no don't have that much time to go through it. Post some more lines around it.


Re: error 001: expected token: ",", but found "return" - KaiserOfGermany - 12.06.2014

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/dm", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid, 1, 9999);
GivePlayerWeapon(playerid, 2, 9999);
GivePlayerWeapon(playerid, 3, 9999);
GivePlayerWeapon(playerid, 4, 9999);
GivePlayerWeapon(playerid, 5, 9999);
GivePlayerWeapon(playerid, 6, 9999);
GivePlayerWeapon(playerid, 7, 9999);
GivePlayerWeapon(playerid, 8, 9999);
GivePlayerWeapon(playerid, 9, 9999);
GivePlayerWeapon(playerid, 10, 9999);
GivePlayerWeapon(playerid, 11, 9999);
GivePlayerWeapon(playerid, 12, 9999);
GivePlayerWeapon(playerid, 13, 9999);
GivePlayerWeapon(playerid, 14, 9999);
GivePlayerWeapon(playerid, 15, 9999);
GivePlayerWeapon(playerid, 16, 9999);
GivePlayerWeapon(playerid, 17, 9999);
GivePlayerWeapon(playerid, 18, 9999);
GivePlayerWeapon(playerid, 22, 9999);
GivePlayerWeapon(playerid, 23, 9999);
GivePlayerWeapon(playerid, 24, 9999);
GivePlayerWeapon(playerid, 25, 9999);
GivePlayerWeapon(playerid, 26, 9999);
GivePlayerWeapon(playerid, 27, 9999);
GivePlayerWeapon(playerid, 28, 9999);
GivePlayerWeapon(playerid, 29, 9999);
GivePlayerWeapon(playerid, 30, 9999);
GivePlayerWeapon(playerid, 31, 9999);
GivePlayerWeapon(playerid, 32, 9999);
GivePlayerWeapon(playerid, 33, 9999);
GivePlayerWeapon(playerid, 34, 9999);
GivePlayerWeapon(playerid, 35, 9999);
GivePlayerWeapon(playerid, 36, 9999);
GivePlayerWeapon(playerid, 37, 9999);
GivePlayerWeapon(playerid, 38, 9999);
GivePlayerWeapon(playerid, 39, 9999);
GivePlayerWeapon(playerid, 40, 9999);
GivePlayerWeapon(playerid, 41, 9999);
GivePlayerWeapon(playerid, 42, 9999);
GivePlayerWeapon(playerid, 43, 9999);
GivePlayerWeapon(playerid, 46, 9999);
GivePlayerWeapon(playerid, 46, 9999);
return 1;
}

if (strcmp("/minigun", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid, 38, 9999);
return 1;
}


if (strcmp("/armour", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
SendClientMessage(playerid, 0xFFD700FF, "Healt And Armour");
return 1;
}
if (strcmp("/skin", cmdtext, true, 10) == 0)
{
SetPlayerSkin(playerid, 1);
SetPlayerSkin(playerid, 2);
return 1;
}
if (strcmp("/kill", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, 0xAA3333AA, "Your Are Dead X)");
return 1;
}
if (strcmp("/deagle", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid, 24, 5000);
SendClientMessage(playerid, 0x33AA33AA, "Deagle Weapon Selected");
return 1;
}
if (strcmp("/cmds", cmdtext, true, 10) ==0)
{
SendClientMessage(playerid, 0xFF0000, "deagle kill skin v armour minigun drag lsa home skin help sf race drift");
return 1;

}


Re: error 001: expected token: ",", but found "return" - Rufio - 12.06.2014

Quote:
Originally Posted by KaiserOfGermany
Посмотреть сообщение
this:

if (strcmp("/cmds", cmdtext, true, 10) ==0)
{
SendClientMessage(playerid, 0xFF0000, "deagle kill skin v armour minigun drag lsa home skin help sf race drift");
return 1;

}
10 is the size of your command, in this case it is 5, not 10. You don't actually even need to use it. And yeah, this command is not bugged. can you post a bit more ?


Re: error 001: expected token: ",", but found "return" - KaiserOfGermany - 12.06.2014

looks like the pawn dislike me


Re: error 001: expected token: ",", but found "return" - KaiserOfGermany - 12.06.2014

so? what is the problem whit the commands?


Re: error 001: expected token: ",", but found "return" - Faisal_khan - 12.06.2014

Hmmm wierd. Everything looks fine to me. The code is working for me. Send me the GM.


Re: error 001: expected token: ",", but found "return" - KaiserOfGermany - 12.06.2014

whit? sorry but im very noob