Jump to content

Question

Posted

salut, am incercat sa fac ceva gen sa poti da /check cand un jucator este offline si sa se ia din baza de date dar cand compilez imi da crash, sunt sigur ca e din cauza ca sunt prea multe, cum as putea sa rezolv?

 

cod dialog

 

        case DIALOG_CHECK: {
            if(!response) return 1;
            new name[180], szQuery[256], szResult[180], check[180];
            GetPVarString(playerid, "CheckName", name, 256);
            format(szQuery, sizeof(szQuery), "SELECT * FROM `users` WHERE `name`='%s'", name);
            new Cache: result = mysql_query(SQL, szQuery);
            switch(listitem)
            {
                case 0: cache_get_field_content(0, "name", szResult), format(check, 256, szResult);    
                case 1: cache_get_field_content(0, "ConnectedTime", szResult), format(check, 256, szResult);
                case 2: cache_get_field_content(0, "PhoneNr", szResult), format(check, 256, szResult);
                case 3: cache_get_field_content(0, "Job", szResult), format(check, 256, szResult);        
                case 4: cache_get_field_content(0, "Warnings", szResult), format(check, 256, szResult);
                case 5: cache_get_field_content(0, "Level", szResult), format(check, 256, szResult);
                case 6: cache_get_field_content(0, "Respect", szResult), format(check, 256, szResult);
                case 7: cache_get_field_content(0, "Money", szResult), format(check, 256, szResult);
                case 8: cache_get_field_content(0, "Bank", szResult), format(check, 256, szResult);            
                case 9: cache_get_field_content(0, "House", szResult), format(check 256, szResult);
                case 10: cache_get_field_content(0, "Bizz", szResult), format(check, 256, szResult);
                case 11: cache_get_field_content(0, "Drugs", szResult), format(check, 256, szResult);
                case 12: cache_get_field_content(0, "Materials", szResult), format(check, 256, szResult);
                case 13: cache_get_field_content(0, "Premium", szResult), format(check, 256, szResult);
                case 14: cache_get_field_content(0, "Vip", szResult), format(check, 256, szResult);
                case 15: cache_get_field_content(0, "Member", szResult), format(check, 256, szResult);
                case 16: cache_get_field_content(0, "Rank", szResult), format(check, 256, szResult);
                case 17: cache_get_field_content(0, "FWarn", szResult), format(check, 256, szResult);
                case 18: cache_get_field_content(0, "FPunish", szResult), format(check, 256, szResult);
                case 19: cache_get_field_content(0, "Days", szResult), format(check, 256, szResult);
                case 20: cache_get_field_content(0, "Rob", szResult), format(check, 256, szResult);
                case 21: cache_get_field_content(0, "EscapePoints", szResult), format(check, 256, szResult);
                case 22: cache_get_field_content(0, "RollPoints", szResult), format(check, 256, szResult);
                case 23: cache_get_field_content(0, "Tokens", szResult), format(check, 256, szResult);
                case 24: cache_get_field_content(0, "PremiumPoints", szResult), format(check, 256, szResult);
                case 25: cache_get_field_content(0, "Admin", szResult), format(check, 256, szResult);
                case 26: cache_get_field_content(0, "Helper", szResult), format(check, 256, szResult);
                case 27: cache_get_field_content(0, "Leader", szResult), format(check, 256, szResult);
                case 28: cache_get_field_content(0, "id", szResult), format(check, 256, szResult);
                case 29: cache_get_field_content(0, "lastOn", szResult), format(check, 256, szResult);
                case 30: cache_get_field_content(0, "RegisterDate", szResult), format(check, 256, szResult);
                case 31: cache_get_field_content(0, "Email", szResult), format(check, 256, szResult);
                case 32: cache_get_field_content(0, "GiftPoints", szResult), format(check, 256, szResult);
            }
            format(string, sizeof(string), "Database result: %s", check);
            SCM(playerid, COLOR_LIGHTRED, string);
            cache_delete(result);    
        }

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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. For more details you can also review our Terms of Use and Privacy Policy.