Jump to content

Char_item.cpp BUILD ERROR


Recommended Posts

  • Premium
22 hours ago, Catii said:

you need to have somewere in your function the declaration of row, something like this:

MYSQL_ROW row = mysql_fetch_row(pRes->pSQLResult);

It already is, but is statically just for if statement..

the good function..

if(skillSQL->Get()->uiNumRows > 0){
	MYSQL_ROW row = mysql_fetch_row(skillSQL->Get()->pSQLResult);
	for(int i = 0; i < 3; i++){
		int skill = 0;
		str_to_number(skill, row[i]);
		if(!skill)
			continue;
		petSkills += 1 << skill;
	}
}

 

23 hours ago, glosteng4141 said:

Thank You Friends.

1.png

2.png

please, next time attach the code, not only picture

  • Love 1
Link to comment
Share on other sites

6 hours ago, Moț said:

It already is, but is statically just for if statement..

the good function..


if(skillSQL->Get()->uiNumRows > 0){
	MYSQL_ROW row = mysql_fetch_row(skillSQL->Get()->pSQLResult);
	for(int i = 0; i < 3; i++){
		int skill = 0;
		str_to_number(skill, row[i]);
		if(!skill)
			continue;
		petSkills += 1 << skill;
	}
}

 

please, next time attach the code, not only picture

 

Ahh Sorry Dude. Thank You.

 

 

Link to comment
Share on other sites

  • Forum Moderator
On 1/6/2020 at 12:55 PM, glosteng4141 said:

59c87d0a57793173251ce89190cf9113.png

 

On 1/7/2020 at 12:42 PM, Moț said:

		if(!skill)
			continue;

 

I don't know how this 'petsystem' works, but i think the condition what he had is to check if the skill slot value isn't -1 or like.

You replace the condition for no reason, i think you didn't understand the boolean conditions.

  • -1 to -2147483647 - True
  • 1 to 2147483647 - True
  • 0 - False
  • 1 - True

So, with your condition the loop will count the -1 skill slot value too.

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 3
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 0

      Moving server from FreeBSD 11.2 to 13.2 - lib needed

    2. 0

      I just implemented some costumes and they are not visible

    3. 0

      Skill Tree Problem

    4. 97

      Ulthar SF V2 (TMP4 Base)

    5. 5

      Client Crashes through Offline Shop (Ikarus)

    6. 5

      VIVY-WORLD2 - FARM TO THE TOP

    7. 0

      ToolTip Bug?

    8. 0

      Skill tree build erorr

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.