glosteng4141 192 Posted January 6, 2020 Share Posted January 6, 2020 Thank You Friends. Link to comment Share on other sites More sharing options...
Catii 94 Posted January 6, 2020 Share Posted January 6, 2020 you need to have somewere in your function the declaration of row, something like this: MYSQL_ROW row = mysql_fetch_row(pRes->pSQLResult); Link to comment Share on other sites More sharing options...
Premium Jira 458 Posted January 7, 2020 Premium Share Posted January 7, 2020 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. please, next time attach the code, not only picture 1 Link to comment Share on other sites More sharing options...
glosteng4141 192 Posted January 7, 2020 Author Share Posted January 7, 2020 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 More sharing options...
Forum Moderator VegaS™ 10264 Posted January 11, 2020 Forum Moderator Share Posted January 11, 2020 (edited) On 1/6/2020 at 12:55 PM, glosteng4141 said: 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 0 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 August 25, 2022 by Metin2 Dev Core X - External 2 Internal 3 Check my GitHub Profile Click to find all the threads started by me [TOOL] Text file loader + JSON Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now