Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[debug] #1 0041a754 in public SyncUp () at D:\Samp - GameMode\GameModeRPG\gamemodes\RPG-GrandGame.pwn:33207 #577

Open
Nlkola1 opened this issue Apr 2, 2022 · 1 comment

Comments

@Nlkola1
Copy link

Nlkola1 commented Apr 2, 2022

task SyncUp[60000]() {
	new query[256], tmphour, tmpminute, hour, Year, Month, Day, minn, tmpsecond, sec;
	GetFMembers();
	GClanMembers();
	gettime(hour,minn,sec); //Line 33207
	gettime(tmphour, tmpminute, tmpsecond);
	getdate(Year, Month, Day);
	PayDay(false);

	if(tmpminute == 00 || tmpminute == 10 || tmpminute == 20 || tmpminute == 30 || tmpminute == 40 || tmpminute == 50) OpenCells();
	else CloseCells();
	new string[256];
	if(Iter_Count(Player) >= ServerBonus) {
		ServerBonus += 100;
		new premiums[40];
		for(new i = 0; i < MAX_PLAYERS; i++) {
			switch(ServerPremium) {
				case 0: {
					premiums = "$500.000";
					PlayerInfo[i][pPremiumPoints] += 1;
					Update(i, pPremiumPointsx);
				}
				case 1: {
					premiums = "5 Respect Points";
					PlayerInfo[i][pHpoints] += 200;
					Update(i, pHpointsx);
				}
				case 2: {
					premiums = "200 BPoints";
					PlayerInfo[i][pGiftPoints] += 100;
					Update(i, pGiftPointsx);
				}
			}
		}
		format(string, sizeof(string), "Server Bonus: {FFFFFF}You received %s from the server", premiums);
		SCMTA(COLOR_NICEGREEN, string);
		ServerPremium = random(2);
		switch(ServerPremium) {
			case 0: { premiums = "$500.000"; }
			case 1: { premiums = "5 Respect Points"; }
			case 2: { premiums = "200 BPoints"; }
		}
		format(string, sizeof(string), "Server Bonus: {FFFFFF}The next bonus will be to %d connected players and consists of %s", ServerBonus, premiums);
		SCMTA(COLOR_NICEGREEN, string);
	}

	FixHour(tmphour);
	WantedTime2();

	tmphour = shifthour;
	if((tmphour > ghour) || (tmphour == 0 && ghour == 23)) {
	    if(hour == 00 && tmpminute == 0) {
			ResetQuest();
			if(Day == 1) {
				mysql_format(SQL, query, sizeof(query), "UPDATE `users` SET `HoursMonth`='0'");
				mysql_tquery(SQL, query, "", "");

			}

			for(new i = 0; i < MAX_CLANS; i++) {
				if(ClanInfo[i][clDays] > 0) {
					ClanInfo[i][clDays] --;
					mysql_format(SQL, query, sizeof(query), "UPDATE `clans` SET `Days`='%d' WHERE `ID`='%d'", ClanInfo[i][clDays], i);
					mysql_tquery(SQL, query, "", "");
					if(ClanInfo[i][clDays] == 0) RemoveClan(i);
				}
			}

			mysql_format(SQL, query, sizeof(query), "UPDATE `users` SET `Days`=`Days`+1 WHERE `Member`>'0'");
			mysql_tquery(SQL, query, "", "");
			mysql_format(SQL, query, sizeof(query), "UPDATE `users` SET `ClanDays`=`ClanDays`+1 WHERE `Clan`>'0'");
			mysql_tquery(SQL, query, "", "");
			mysql_format(SQL, query, sizeof(query), "UPDATE `users` SET `DayLogin`='0',`DayHours`='0',`DailyLogin`='0'");
			mysql_tquery(SQL, query, "", "");
		    mysql_format(SQL, query, sizeof(query), "UPDATE `users` SET `HelpedPlayersToday`='0' WHERE `Helper`>='1'");
		    mysql_tquery(SQL ,query, "", "");

	        foreach(new i : Player) {
	            if(IsPlayerConnected(i) && IsPlayerLogged[i] == 1) {
					if(PlayerInfo[i][pDailyLogin] == 1) PlayerInfo[i][pDailyLogin] = 0;
					if(PlayerInfo[i][pMember] != 0) PlayerInfo[i][pDays] ++;

	                PlayerInfo[i][pUsed] = 1;
					if(PlayerInfo[i][pHelper] != 0) PlayerInfo[i][pHelpedPlayersToday] = 0;
	            }
	        }
	    }
		ghour = tmphour;
		if(realtime) SetWorldTimeEx(hour);
	}
	return true;
}

Help me
@Nlkola1 Nlkola1 changed the title YSI Compile Error YSI Compile Warning 208, 213, 235 Help Pls Apr 5, 2022
@Nlkola1 Nlkola1 changed the title YSI Compile Warning 208, 213, 235 Help Pls YSI Run | YSI Fatal Error: Out of code generation (CGen) space. The current value of CGEN_MEMORY is 60000, please recompile with a higher value (approximately 420000) Apr 5, 2022
@Nlkola1 Nlkola1 changed the title YSI Run | YSI Fatal Error: Out of code generation (CGen) space. The current value of CGEN_MEMORY is 60000, please recompile with a higher value (approximately 420000) [debug] #1 0041a754 in public SyncUp () at D:\Samp - GameMode\GameModeRPG\gamemodes\RPG-GrandGame.pwn:33207 Apr 6, 2022
@adib-yg
Copy link

adib-yg commented Jul 30, 2022

What's the problem?
Is this related to YSI includes?

By the way
mysql_format(SQL, query, sizeof(query), "UPDATE users SET Days=Days+1 WHERE Member>'0'"); mysql_tquery(SQL, query, "", "");
You don't need format here.

foreach(new i : Player) { if(IsPlayerConnected(i)
why

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants