SA-MP Forums Archive
Gamemode Problem - 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: Gamemode Problem (/showthread.php?tid=482776)



Gamemode Problem - Jakare - 22.12.2013

i get this error when i compile que GM

Код:
C:\Documents and Settings\Jakarй\Desktop\SAMP server\gamemodes\grandlarc2.pwn(154) : error 001: expected token: ";", but found "if"
this is the GM code


Код:
144: public OnPlayerDeath(playerid, killerid, reason)
145: {
146: 	gPlayerHasCitySelected[playerid] = 0;
147:     new playercash;
148:     new giveaway
149: 
150:     // if they ever return to class selection make them city
151: 	// select again first
152: 
153: 
154: 	if(killerid == INVALID_PLAYER_ID) {GivePlayerMoney(playerid, -10000);
155: 	} else {
156: 	    giveaway = playercash / 2;
157:		playercash = GetPlayerMoney(playerid);
158: 		if(playercash > 0)  {
159:			GivePlayerMoney(killerid, playercash);
160:			GivePlayerMoney(playerid, giveaway);
161:		} else {GivePlayerMoney(playerid, 150000);}
162:	}
163:   	return 1;
164:}



Re: Gamemode Problem - TheOriginal1337 - 22.12.2013

"148: new giveaway"

must be "new giveaway;"