SA-MP Forums Archive
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: expected token: ";", but found "return" (/showthread.php?tid=483529)



expected token: ";", but found "return" - BarFix - 26.12.2013

When i use that code:
Quote:

public OnPlayerDeath(playerid, killerid, reason)
{

SetPlayerScore(killerid,GetPlayerScore(killerid)+1 );
GivePlayerMoney(killerid,500);
GivePlayerMoney(playerid,-100)

return 1;
}

i get error.
Quote:

error 001: expected token: ";", but found "return"




Re: expected token: ";", but found "return" - boomerboom - 26.12.2013

Код:
GivePlayerMoney(playerid,-100);



Re: expected token: ";", but found "return" - Mandrakke - 26.12.2013

public OnPlayerDeath(playerid, killerid, reason)
{

SetPlayerScore(killerid,GetPlayerScore(killerid)+1 );
GivePlayerMoney(killerid,500);
GivePlayerMoney(playerid,-100);

return 1;
}


Re: expected token: ";", but found "return" - BarFix - 26.12.2013

Quote:
Originally Posted by boomerboom
Посмотреть сообщение
Код:
GivePlayerMoney(playerid,-100);
Quote:
Originally Posted by Mandrakke
Посмотреть сообщение
public OnPlayerDeath(playerid, killerid, reason)
{

SetPlayerScore(killerid,GetPlayerScore(killerid)+1 );
GivePlayerMoney(killerid,500);
GivePlayerMoney(playerid,-100);

return 1;
}
ah lol, my mistake!
Thank you guys!


Re: expected token: ";", but found "return" - Zloobe - 26.12.2013

Put ";" in the end of GivePlayerMoney(playerid,-100)";"