[Help] Making a input box
#1

I'm trying to make a input box for my glasses system but when i try to compile it i get 26 errors I havnt scripted in a while so I'm a bit rusty, what did i do wrong?

Код:
if(dialogid == GLASS)
	 {
	 
		if(response)
		{
		
		    if(!(strcal(inputtext) >= 33 && strval(inputtext) <= 1))
		    {
		    tmp = strtok(cmdtext, idx);
    		skin = GetPlayerSkin(playerid);
    		id = strval(tmp);
    		
                if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, 0x40FF00FF, "You dont have enough money");
    		    id--;
    		    glasseid =  strval(inputtext));
     			SetPlayerHoldingObject(playerid, glasseid, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5]);
                GivePlayerMoney(playerid,-10);
                SendClientMessage(playerid, COLOR_YELLOW,"HINT:To take your glasses off use /glassesoff");
     			GetPlayerRPName(playerid, sendername, sizeof(sendername));
    			new length = strlen(cmdtext);
    			while ((idx < length) && (cmdtext[idx] <= ' '))
    			{
   	    			idx++;
     	  		}
     			new offset = idx;
		    	new result[96];
	    		while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
		    	{
	    			result[idx - offset] = cmdtext[idx];
	    			idx++;
	    		}
	    		result[idx - offset] = EOS;
   	    		if (result[playerid] == '_')
                result[playerid] = ' ';
     			if(!strlen(result))
    			{
           			if(PlayerInfo[playerid][pMask] == 1)
         			{
	     	     	    format(string, sizeof(string), "* The Stranger puts on a pair of sunglasses.");
	         		}
		  	        else
		         	{
			        	format(string, sizeof(string), "* %s puts on a pair of sunglasses.", sendername);
		        	}
	         		ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
	  		    }
	  		    }
Reply
#2

Show the errors, highlight the error lines with "//" and use [ pawn ] [ /pawn ] because in [ code ] it's hardly readable.
Reply
#3

They are just like a bunch of random errors not even dealing with the code but if i "//" it all out the script compiles fine
heres the code

pawn Код:
if(dialogid == GLASS)
     {
     
        if(response)
        {
       
            if(!(strcal(inputtext) >= 33 && strval(inputtext) <= 1))
            {
            tmp = strtok(cmdtext, idx);
            skin = GetPlayerSkin(playerid);
            id = strval(tmp);
           
                if(GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, 0x40FF00FF, "You dont have enough money");
                id--;
                glasseid =  strval(inputtext));
                SetPlayerHoldingObject(playerid, glasseid, 2, SkinOffSet[skin][0], SkinOffSet[skin][1], SkinOffSet[skin][2], SkinOffSet[skin][3], SkinOffSet[skin][4], SkinOffSet[skin][5]);
                GivePlayerMoney(playerid,-10);
                SendClientMessage(playerid, COLOR_YELLOW,"HINT:To take your glasses off use /glassesoff");
                GetPlayerRPName(playerid, sendername, sizeof(sendername));
                new length = strlen(cmdtext);
                while ((idx < length) && (cmdtext[idx] <= ' '))
                {
                    idx++;
                }
                new offset = idx;
                new result[96];
                while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
                {
                    result[idx - offset] = cmdtext[idx];
                    idx++;
                }
                result[idx - offset] = EOS;
                if (result[playerid] == '_')//Richard / Adam / Ray- Remove the _ from the name
                result[playerid] = ' ';//Richard / Adam / Ray- Remove the _ from the name
                if(!strlen(result))
                {
                    if(PlayerInfo[playerid][pMask] == 1)
                    {
                        format(string, sizeof(string), "* The Stranger puts on a pair of sunglasses.");
                    }
                    else
                    {
                        format(string, sizeof(string), "* %s puts on a pair of sunglasses.", sendername);
                    }
                    ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                }
                }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)