SA-MP Forums Archive
Help me fast please. - 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: Help me fast please. (/showthread.php?tid=295403)



Help me fast please. - ttimpz0r - 06.11.2011

I get these errors:
Код:
C:\Users\Timo\Desktop\New folder\gamemodes\Test3.pwn(198) : error 029: invalid expression, assumed zero
C:\Users\Timo\Desktop\New folder\gamemodes\Test3.pwn(4637) : warning 203: symbol is never used: "OnGameModeInit"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
1 Error.
Код:
line196]
line197]main()
line198]public OnGameModeInit()
line199]{
Код:
public MoneyGrubScoreUpdate()
{
 new CashScore;
	new name[MAX_PLAYER_NAME];
	//new string[256];
	for(new i=0; i<MAX_PLAYERS; i++)
	{
		if (IsPlayerConnected(i))
		{
			GetPlayerName(i, name, sizeof(name));
   			CashScore = GetPlayerMoney(i);
			SetPlayerScore(i, CashScore);
			if (CashScore > CashScoreOld)
			{
				CashScoreOld = CashScore;
			}
	 	}
	}
}
I dont have line 4637, 4636 is the last one.


Re: Help me fast please. - Backwardsman97 - 06.11.2011

Just remove the main()


Re: Help me fast please. - AeroBlast - 06.11.2011

You got your OnGameModeInit in your main function.
Instead of
pawn Код:
main()
public OnGameModeInit()
{
It should be:
pawn Код:
main()
{
}

public OnGameModeInit()
{
    //your code under OnGameMode Init
    return 1;
}

//Rest of your code



Re: Help me fast please. - ttimpz0r - 06.11.2011

Ty, bro.
// Backwardsman97 way helped me.. :P But thank you to aero.