DIALOG_STYLE_INPUT input text
#1

hello friends i have problem with inputtexts i really cant use it

heres my code
Код:
        case 2455: {
            new puttext;
            format(puttext,1,inputtext);
            new i = GetPVarInt(playerid,"playerVehID");
			if(strval(puttext)=="1")
			{
				if(vInfo[i][vehGun1]==0)
            	{
           	 		vInfo[i][vehGun1]=USER[playerid][GUN1];
           	 		vInfo[i][vehAmmo1]=USER[playerid][AMMO1];
           	 		USER[playerid][GUN1]=0;
           	 		USER[playerid][AMMO1]=0;
            	}
            	if(vInfo[i][vehGun2]==0)
            	{
           	 		vInfo[i][vehGun2]=USER[playerid][GUN1];
           	 		vInfo[i][vehAmmo2]=USER[playerid][AMMO1];
           	 		USER[playerid][GUN1]=0;
           	 		USER[playerid][AMMO1]=0;
            	}
            	if(vInfo[i][vehGun3]==0)
            	{
           	 		vInfo[i][vehGun3]=USER[playerid][GUN1];
           	 		vInfo[i][vehAmmo3]=USER[playerid][AMMO1];
           	 		USER[playerid][GUN1]=0;
           	 		USER[playerid][AMMO1]=0;
            	}
			}
			if(strval(puttext)=="2")
			{
				if(vInfo[i][vehGun1]==0)
            	{
           	 		vInfo[i][vehGun1]=USER[playerid][GUN2];
           	 		vInfo[i][vehAmmo1]=USER[playerid][AMMO2];
           	 		USER[playerid][GUN2]=0;
           	 		USER[playerid][AMMO2]=0;
            	}
            	if(vInfo[i][vehGun2]==0)
            	{
           	 		vInfo[i][vehGun2]=USER[playerid][GUN2];
           	 		vInfo[i][vehAmmo2]=USER[playerid][AMMO2];
           	 		USER[playerid][GUN2]=0;
           	 		USER[playerid][AMMO2]=0;
            	}
            	if(vInfo[i][vehGun3]==0)
            	{
           	 		vInfo[i][vehGun3]=USER[playerid][GUN2];
           	 		vInfo[i][vehAmmo3]=USER[playerid][AMMO2];
           	 		USER[playerid][GUN2]=0;
           	 		USER[playerid][AMMO2]=0;
            	}
			}
			if(strval(puttext)=="3")
			{
				if(vInfo[i][vehGun1]==0)
            	{
           	 		vInfo[i][vehGun1]=USER[playerid][GUN3];
           	 		vInfo[i][vehAmmo1]=USER[playerid][AMMO3];
           	 		USER[playerid][GUN3]=0;
           	 		USER[playerid][AMMO3]=0;
            	}
            	if(vInfo[i][vehGun2]==0)
            	{
           	 		vInfo[i][vehGun2]=USER[playerid][GUN3];
           	 		vInfo[i][vehAmmo2]=USER[playerid][AMMO3];
           	 		USER[playerid][GUN3]=0;
           	 		USER[playerid][AMMO3]=0;
            	}
            	if(vInfo[i][vehGun3]==0)
            	{
           	 		vInfo[i][vehGun3]=USER[playerid][GUN3];
           	 		vInfo[i][vehAmmo3]=USER[playerid][AMMO3];
           	 		USER[playerid][GUN3]=0;
           	 		USER[playerid][AMMO3]=0;
            	}
			}
I am really lost. Any help is appreciated.
Reply
#2

What's the problem and why're you formatting inputtext into a new variable when you could just use inputtext?
Reply
#3

You are declaring puttext as an integer, and your format it as a string,
you will get error "tag mismatch"

And yeah why you create a new variable, you can just use inputtext
or fix by making puttext a string
PHP код:
new puttext[1]; 
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)