Errors.
#1

Quote:

(435)error 029: invalid expression, assumed zero
(435) : error 017: undefined symbol "cmd_spawncar"
(435) : error 029: invalid expression, assumed zero

Above that CMD I have a dialog response & when I delete the dialog response, it complies without errors.
Dialog response code :
pawn Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response)
    {
    switch(dialogid)
        {
        case 1:
            {
            switch(listitem)
            {
                case 0:
                {
                    GivePlayerWeapon(playerid, 24, 500);
                    SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
                }
                case 1:
                {
                    GivePlayerWeapon(playerid, 22, 500);
                    SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
                }
                case 2:
                {
                    GivePlayerWeapon(playerid, 25, 500);
                    SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
                }
                case 3:
                {
                    GivePlayerWeapon(playerid, 26, 500);
                    SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
                }
                case 4:
                {
                    GivePlayerWeapon(playerid, 27, 500);
                    SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
                }
                case 5:
                {
                    GivePlayerWeapon(playerid, 32, 500);
                    SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
                }
                case 6:
                {
                    GivePlayerWeapon(playerid, 28, 500);
                    SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
                }
                case 7:
                {
                    GivePlayerWeapon(playerid, 29, 500);
                    SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
                }
                case 8:
                {
                    GivePlayerWeapon(playerid, 30, 500);
                    SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
                }
                case 9:
                {
                    GivePlayerWeapon(playerid, 31, 500);
                    SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
                }
                case 10:
                {
                    GivePlayerWeapon(playerid, 33, 500);
                    SendClientMessage(playerid, COLOR_WHITE, "Enjoy your weapon.");
                }
            }
        }
     }
        return 1;
}
Reply
#2

Where is line 435 give us the hole dialog code with cmds
Reply
#3

pawn Code:
COMMAND:spawncar(playerid, params[])
{
    new vehicleid, color1, color2;
    if(!sscanf(params, "iii", vehicleid, color1, color2))
    {
       new vin;
       new Float:x, Float:y, Float:z;
       GetPlayerPos(playerid, x, y, z);
       vin=CreateVehicle(vehicleid, x, y, z, 0.0, color1, color2, -1);
       PutPlayerInVehicle(playerid, vin, 0);
    }else{
        SendClientMessage(playerid, COLOR_GREY, "ERROR: This command requires: /spawncar [vehicleid][color1][color2]");

    }
    return 1;
}
As I said, I think it's because of the dialog response & not the /spawncar.
Reply
#4

You are missing a closing bracket on the OnDialogResponse callback. That is what poor indention gets you.
Reply
#5

Found, L&A or w/e.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)