ERRORS...
#1

hello, im trying to make a shop but when i trying to save it.. giving me errors idk how to fix it...

All Errors in OnDialogResponse...
Код:
error 001: expected token: "-string end-", but found "-identifier-"
error 017: undefined symbol "COL_ORANGE"
warning 215: expression has no effect
error 001: expected token: "-string end-", but found "-identifier-"
 fatal error 107: too many error messages on one line
PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 55)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                
ShowPlayerDialog(playerid,55+1,DIALOG_STYLE_LIST,""COL_ORANGE"Vehicles",""COL_GREY"Sultan "COL_GREEN"$ 20.000\n"COL_GREY"New Maverick "COL_GREEN"$ 25.000\n"COL_GREY"NRG-500 "COL_GREEN"$ 11.000\n"COL_GREY"Sanchez "COL_GREEN"$ 10.000\n"COL_GREY"Speeder "COL_GREEN"$ 17.000\n"COL_GREY"Squallo "COL_GREEN"$ 17.000\n"COL_GREY"Hunter "COL_GREEN"$ 250.000"COL_GREY"Monster Truck "COL_GREEN"$ 40.000\n"COL_GREY"","Select""Cancel");
            }
            if(
listitem == 1)
            {
                    
ShowPlayerDialog(playerid,55+2,DIALOG_STYLE_LIST,""COL_ORANGE"Weapons",""COL_GREY"Knife "COL_GREEN"$ 200\n"COL_GREY"Desert Eagle "COL_GREEN"$ 12.000\n"COL_GREY"Sawn-offs "COL_GREEN"$ 25.000\n"COL_GREY"SMG "COL_GREEN"$ 15.000\n"COL_GREY"M4 "COL_GREEN"$ 24.000","Select""Cancel");
            }
        }
        return 
1;
    }
if(
dialogid == 55+1)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
            if(
GetPlayerMoney(playerid) < 20000) return SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
            new 
shopcar[MAX_PLAYERS];
            new 
Float:xFloat:yFloat:z;
               
GetPlayerPos(playeridxyz);
            
shopcar[playerid] = AddStaticVehicle(560xyz82.2873,-1, -1);
            
GivePlayerMoney(playerid,-20000);
            
SendClientMessage(playeridred""COL_GREY"You bought a"COL_ORANGE" Sultan.");
            
PutPlayerInVehicle(playeridshopcar[playerid], 0);
            }
            if(
listitem == 1)
            {
            if(
GetPlayerMoney(playerid) < 25000) return SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
            new 
shopcar[MAX_PLAYERS];
            new 
Float:xFloat:yFloat:z;
               
GetPlayerPos(playeridxyz);
            
shopcar[playerid] = AddStaticVehicle(488xyz82.2873,-1, -1);
            
GivePlayerMoney(playerid,-25000);
            
SendClientMessage(playeridred""COL_GREY"You bought a"COL_ORANGE" News Maverick.");
            
PutPlayerInVehicle(playeridshopcar[playerid], 0);
            }
            if(
listitem == 2)
            {
            if(
GetPlayerMoney(playerid) < 11000) return SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
            new 
shopcar[MAX_PLAYERS];
            new 
Float:xFloat:yFloat:z;
               
GetPlayerPos(playeridxyz);
            
shopcar[playerid] = AddStaticVehicle(522xyz82.2873,-1, -1);
            
GivePlayerMoney(playerid,-11000);
            
SendClientMessage(playeridred""COL_GREY"You bought a"COL_ORANGE" NRG-500.");
            
PutPlayerInVehicle(playeridshopcar[playerid], 0);
            }
            if(
listitem == 3)
            {
            if(
GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
            new 
shopcar[MAX_PLAYERS];
            new 
Float:xFloat:yFloat:z;
               
GetPlayerPos(playeridxyz);
            
shopcar[playerid] = AddStaticVehicle(468xyz82.2873,-1, -1);
            
GivePlayerMoney(playerid,-10000);
            
SendClientMessage(playeridred""COL_GREY"You bought a"COL_ORANGE" Sanchez.");
            
PutPlayerInVehicle(playeridshopcar[playerid], 0);
            }
            if(
listitem == 4)
            {
            if(
GetPlayerMoney(playerid) < 17000) return SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
            new 
shopcar[MAX_PLAYERS];
            new 
Float:xFloat:yFloat:z;
               
GetPlayerPos(playeridxyz);
            
shopcar[playerid] = AddStaticVehicle(452xyz82.2873,-1, -1);
            
GivePlayerMoney(playerid,-17000);
            
SendClientMessage(playeridred""COL_GREY"You bought a"COL_ORANGE" Speeder.");
            
PutPlayerInVehicle(playeridshopcar[playerid], 0);
            }
            if(
listitem == 5)
            {
            if(
GetPlayerMoney(playerid) < 17000) return SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
            new 
shopcar[MAX_PLAYERS];
            new 
Float:xFloat:yFloat:z;
               
GetPlayerPos(playeridxyz);
            
shopcar[playerid] = AddStaticVehicle(446xyz82.2873,-1, -1);
            
GivePlayerMoney(playerid,-17000);
            
SendClientMessage(playeridred""COL_GREY"You bought a"COL_ORANGE" Squallo.");
            
PutPlayerInVehicle(playeridshopcar[playerid], 0);
            }
            if(
listitem == 6)
            {
            if(
GetPlayerMoney(playerid) < 250000) return SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
            new 
shopcar[MAX_PLAYERS];
            new 
Float:xFloat:yFloat:z;
               
GetPlayerPos(playeridxyz);
            
shopcar[playerid] = AddStaticVehicle(520xyz82.2873,-1, -1);//446 moet nog hydra id worden
            
GivePlayerMoney(playerid,-250000);
            
SendClientMessage(playeridred""COL_GREY"You bought a"COL_ORANGE" Hydra.");
            
PutPlayerInVehicle(playeridshopcar[playerid], 0);
            }
            if(
listitem == 7)
            {
            if(
GetPlayerMoney(playerid) < 400000) return SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
            new 
shopcar[MAX_PLAYERS];
            new 
Float:xFloat:yFloat:z;
               
GetPlayerPos(playeridxyz);
            
shopcar[playerid] = AddStaticVehicle(406xyz82.2873,-1, -1);//446 moet nog hydra id worden
            
GivePlayerMoney(playerid,-40000);
            
SendClientMessage(playeridred""COL_GREY"You bought a"COL_ORANGE" Monster.");
            
PutPlayerInVehicle(playeridshopcar[playerid], 0);
            }
        }
        return 
1;
    }
    if(
dialogid == 55+2)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
            if(
GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
            
GivePlayerMoney(playerid,-200);
            
SendClientMessage(playeridred""COL_GREY"You bought a"COL_ORANGE" Knife.");
            
GivePlayerWeapon(playerid41);
            }
             if(
listitem == 1)
            {
            if(
GetPlayerMoney(playerid) < 12000) return SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
            
GivePlayerMoney(playerid,-12000);
            
SendClientMessage(playeridred""COL_GREY"You bought a"COL_ORANGE" Desert Eagle.");
            
GivePlayerWeapon(playerid24999);
            }
            if(
listitem == 2)
            {
            if(
GetPlayerMoney(playerid) < 25000) return SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
            
GivePlayerMoney(playerid,-25000);
            
SendClientMessage(playeridred""COL_GREY"You bought"COL_ORANGE" Sawn Offs.");
            
GivePlayerWeapon(playerid26999);
            }
            if(
listitem == 3)
            {
            if(
GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
            
GivePlayerMoney(playerid,-15000);
            
SendClientMessage(playeridred""COL_GREY"You bought a"COL_ORANGE" SMG.");
            
GivePlayerWeapon(playerid29999);
            }
            if(
listitem == 4)
            {
            if(
GetPlayerMoney(playerid) < 24000) return SendClientMessage(playerid0xFFFFFF"You don't have enough cash.");
            
GivePlayerMoney(playerid,-24000);
            
SendClientMessage(playeridred""COL_GREY"You bought a"COL_ORANGE" M4.");
            
GivePlayerWeapon(playerid31999);
            }
        return 
1;
}
    }
    return 
0;

Reply
#2

Please show us your
Код:
#define COL_ORANGE
Reply
#3

Hi again. its worked succsfully.. but there is a something ... When i typing /shop nothing happend giving me Unkown Command ... can you help me?
Reply
#4

We aren't wizards to get ur /shop command pls post it
Reply
#5

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/shop", true))
    {
        ShowPlayerDialog(playerid,55,DIALOG_STYLE_LIST,"Shop","Vehicles\nWeapons","Select", "Cancel");
        SendClientMessage(playerid,-1,"If the shop doesn't pop up, it is unavaible for this mission!");
        return 1;
    }
    return 0;
}
EDIT:

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 55)
    {
        if(response)
        {
            if(listitem == 0)
            {
                ShowPlayerDialog(playerid,55+1,DIALOG_STYLE_LIST,"Vehicles","Sultan "COL_GREEN"$ 20.000\n"COL_GREY"New Maverick "COL_GREEN"$ 25.000\n"COL_GREY"NRG-500 "COL_GREEN"$ 11.000\n"COL_GREY"Sanchez "COL_GREEN"$ 10.000\n"COL_GREY"Speeder "COL_GREEN"$ 17.000\n"COL_GREY"Squallo "COL_GREEN"$ 17.000\n"COL_GREY"Hunter "COL_GREEN"$ 250.000"COL_GREY"Monster Truck "COL_GREEN"$ 40.000\n"COL_GREY"","Select", "Cancel");

            }
            if(listitem == 1)
            {
                    ShowPlayerDialog(playerid,55+2,DIALOG_STYLE_LIST,""COL_ORANGE"Weapons",""COL_GREY"Knife "COL_GREEN"$ 200\n"COL_GREY"Desert Eagle "COL_GREEN"$ 12.000\n"COL_GREY"Sawn-offs "COL_GREEN"$ 25.000\n"COL_GREY"SMG "COL_GREEN"$ 15.000\n"COL_GREY"M4 "COL_GREEN"$ 24.000","Select", "Cancel");
            }
        }
        return 1;
    }


if(dialogid == 55+1)
    {
        if(response)
        {
            if(listitem == 0)
            {
            if(GetPlayerMoney(playerid) < 20000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
            new shopcar[MAX_PLAYERS];
			new Float:x, Float:y, Float:z;
	   		GetPlayerPos(playerid, x, y, z);
			shopcar[playerid] = AddStaticVehicle(560, x, y, z, 82.2873,-1, -1);
			GivePlayerMoney(playerid,-20000);
			SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" Sultan.");
			PutPlayerInVehicle(playerid, shopcar[playerid], 0);
            }
            if(listitem == 1)
            {
            if(GetPlayerMoney(playerid) < 25000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
            new shopcar[MAX_PLAYERS];
			new Float:x, Float:y, Float:z;
	   		GetPlayerPos(playerid, x, y, z);
			shopcar[playerid] = AddStaticVehicle(488, x, y, z, 82.2873,-1, -1);
			GivePlayerMoney(playerid,-25000);
			SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" News Maverick.");
			PutPlayerInVehicle(playerid, shopcar[playerid], 0);
            }
            if(listitem == 2)
            {
            if(GetPlayerMoney(playerid) < 11000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
            new shopcar[MAX_PLAYERS];
			new Float:x, Float:y, Float:z;
	   		GetPlayerPos(playerid, x, y, z);
			shopcar[playerid] = AddStaticVehicle(522, x, y, z, 82.2873,-1, -1);
			GivePlayerMoney(playerid,-11000);
			SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" NRG-500.");
			PutPlayerInVehicle(playerid, shopcar[playerid], 0);
            }
            if(listitem == 3)
            {
            if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
            new shopcar[MAX_PLAYERS];
			new Float:x, Float:y, Float:z;
	   		GetPlayerPos(playerid, x, y, z);
			shopcar[playerid] = AddStaticVehicle(468, x, y, z, 82.2873,-1, -1);
			GivePlayerMoney(playerid,-10000);
			SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" Sanchez.");
			PutPlayerInVehicle(playerid, shopcar[playerid], 0);
            }
            if(listitem == 4)
            {
            if(GetPlayerMoney(playerid) < 17000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
            new shopcar[MAX_PLAYERS];
			new Float:x, Float:y, Float:z;
	   		GetPlayerPos(playerid, x, y, z);
			shopcar[playerid] = AddStaticVehicle(452, x, y, z, 82.2873,-1, -1);
			GivePlayerMoney(playerid,-17000);
			SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" Speeder.");
			PutPlayerInVehicle(playerid, shopcar[playerid], 0);
            }
            if(listitem == 5)
            {
            if(GetPlayerMoney(playerid) < 17000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
            new shopcar[MAX_PLAYERS];
			new Float:x, Float:y, Float:z;
	   		GetPlayerPos(playerid, x, y, z);
			shopcar[playerid] = AddStaticVehicle(446, x, y, z, 82.2873,-1, -1);
			GivePlayerMoney(playerid,-17000);
			SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" Squallo.");
			PutPlayerInVehicle(playerid, shopcar[playerid], 0);
            }
            if(listitem == 6)
            {
            if(GetPlayerMoney(playerid) < 250000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
            new shopcar[MAX_PLAYERS];
			new Float:x, Float:y, Float:z;
	   		GetPlayerPos(playerid, x, y, z);
			shopcar[playerid] = AddStaticVehicle(520, x, y, z, 82.2873,-1, -1);//446 moet nog hydra id worden
			GivePlayerMoney(playerid,-250000);
			SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" Hydra.");
			PutPlayerInVehicle(playerid, shopcar[playerid], 0);
            }
            if(listitem == 7)
            {
            if(GetPlayerMoney(playerid) < 400000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
            new shopcar[MAX_PLAYERS];
			new Float:x, Float:y, Float:z;
	   		GetPlayerPos(playerid, x, y, z);
			shopcar[playerid] = AddStaticVehicle(406, x, y, z, 82.2873,-1, -1);//446 moet nog hydra id worden
			GivePlayerMoney(playerid,-40000);
			SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" Monster.");
			PutPlayerInVehicle(playerid, shopcar[playerid], 0);
            }
        }
        return 1;

    }

    if(dialogid == 55+2)
    {
        if(response)
        {
            if(listitem == 0)
            {
            if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
			GivePlayerMoney(playerid,-200);
			SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" Knife.");
			GivePlayerWeapon(playerid, 4, 1);
        	}
         	if(listitem == 1)
            {
            if(GetPlayerMoney(playerid) < 12000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
			GivePlayerMoney(playerid,-12000);
			SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" Desert Eagle.");
			GivePlayerWeapon(playerid, 24, 999);
        	}
        	if(listitem == 2)
            {
            if(GetPlayerMoney(playerid) < 25000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
			GivePlayerMoney(playerid,-25000);
			SendClientMessage(playerid, red, ""COL_GREY"You bought"COL_ORANGE" Sawn Offs.");
			GivePlayerWeapon(playerid, 26, 999);
        	}
        	if(listitem == 3)
            {
            if(GetPlayerMoney(playerid) < 15000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
			GivePlayerMoney(playerid,-15000);
			SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" SMG.");
			GivePlayerWeapon(playerid, 29, 999);
        	}
        	if(listitem == 4)
            {
            if(GetPlayerMoney(playerid) < 24000) return SendClientMessage(playerid, 0xFFFFFF, "You don't have enough cash.");
			GivePlayerMoney(playerid,-24000);
			SendClientMessage(playerid, red, ""COL_GREY"You bought a"COL_ORANGE" M4.");
			GivePlayerWeapon(playerid, 31, 999);
        	}
        return 1;
}
    }
	return 1;
}
Reply
#6

Quote:
Originally Posted by Man43
Посмотреть сообщение
Hi again. its worked succsfully.. but there is a something ... When i typing /shop nothing happend giving me Unkown Command ... can you help me?
What exactly did work successfully? I did not tell you to do anything.
Reply
#7

Quote:
Originally Posted by Troydere
Посмотреть сообщение
What exactly did work successfully? I did not tell you to do anything.
lol @Troydere, he mean The Code is worked but When joining the server and type /shop given him : SERVER: Unkown Command. lol.. and he asking how to make if Player typing /shop giving him a dialog with vehicles / weapons

@Sorry if im not right.
Reply
#8

Quote:
Originally Posted by Troydere
Посмотреть сообщение
What exactly did work successfully? I did not tell you to do anything.
Yes as mean @RedRex.. when player type /shop nothing happend...

Quote:
Originally Posted by RedRex
Посмотреть сообщение
lol @Troydere, he mean The Code is worked but When joining the server and type /shop given him : SERVER: Unkown Command. lol.. and he asking how to make if Player typing /shop giving him a dialog with vehicles / weapons

@Sorry if im not right.
lol,
Thank you for your explanation.. you right.
Reply
#9

Try this:

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/shop", true))
    {
        ShowPlayerDialog(playerid,55,DIALOG_STYLE_LIST,"Shop","Vehicles\n\Weapons","Select", "Cancel");
        SendClientMessage(playerid,-1,"If the shop doesn't pop up, it is unavaible for this mission!");
        return 1;
    }
    return 0;
}
Reply
#10

EDIT: I trying to use Pickup's its worked Thanks for everyone trying to help me DDD.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)