Numbers wont Appear in dialog
#1

Hi anyone can help me fix this problem ?

https://imgur.com/a/SDbe9am
Numbers in dialog wont appear
Code:
Код HTML:
		case DIALOG_RMENU:
		{
		    new rmenu[600], gender[8], float:age, float:skin;
			PlayerInfo[playerid][pAge] = age;
			PlayerInfo[playerid][pSkin] = skin;
			if(PlayerInfo[playerid][pGender] == 1) gender = "Male";
	        else if(PlayerInfo[playerid][pGender] == 2) gender = "Female";
            format(rmenu, sizeof (rmenu), "Name:               %s\nGender:             %s\nAge:                %s\nSKIN ID:            %s\nComplete", PlayerInfo[playerid][pUsername], gender, age, skin);
		    ShowPlayerDialog(playerid, DIALOG_RMENU, DIALOG_STYLE_LIST, "NT:RP:  REGISTER", rmenu, "Select", "");
		}
i tried to find a fix but i cant
Reply
#2

You are using "float" instead of an integer, age and skin are not floats.

instead of

pawn Код:
new rmenu[600], gender[8], float:age, float:skin;
use this, it should fix your problem

pawn Код:
new rmenu[600], gender[8], age, skin;
the problem was you we're using Floats in age and skin, which should be an integer, removing the "float:" in your code should fix the problem.
Reply
#3

I tried but same thing nothing appears
Reply
#4

Hi

u used %s which is for string only use %i or %d which are for integers instead of %s like this:-

PHP код:
case DIALOG_RMENU:
        {
            new 
rmenu[600], gender[8], float:agefloat:skin;
            
PlayerInfo[playerid][pAge] = age;
            
PlayerInfo[playerid][pSkin] = skin;
            if(
PlayerInfo[playerid][pGender] == 1gender "Male";
            else if(
PlayerInfo[playerid][pGender] == 2gender "Female";
            
format(rmenusizeof (rmenu), "Name:               %s\nGender:             %s\nAge:                %i\nSKIN ID:            %i\nComplete"PlayerInfo[playerid][pUsername], genderageskin);
            
ShowPlayerDialog(playeridDIALOG_RMENUDIALOG_STYLE_LIST"NT:RP:  REGISTER"rmenu"Select""");
        } 
Reply
#5

Thanks it works +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)