SA-MP Forums Archive
Help with dialog + streamer - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help with dialog + streamer (/showthread.php?tid=229691)



Help with dialog + streamer - Markx - 22.02.2011

Код:
C:\Users\Marko\Desktop\Vehicle0.3c.pwn(132) : warning 217: loose indentation
C:\Users\Marko\Desktop\Vehicle0.3c.pwn(132) : error 014: invalid statement; not in switch
C:\Users\Marko\Desktop\Vehicle0.3c.pwn(132) : warning 215: expression has no effect
C:\Users\Marko\Desktop\Vehicle0.3c.pwn(132) : error 001: expected token: ";", but found ":"
C:\Users\Marko\Desktop\Vehicle0.3c.pwn(132) : error 029: invalid expression, assumed zero
C:\Users\Marko\Desktop\Vehicle0.3c.pwn(132) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
pawn Код:
}
        case DOOR_DIALOG:
        {
            if(response)
            {
                switch(listitem)
                {
                    case 0:
                    {
                        new vid = GetPlayerVehicleID(playerid);
                        if(vid != INVALID_VEHICLE_ID) {
                        GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                        SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE_PARAMS_ON,bonnet,boot,objective);
                    }
                    case 1: //errors here!!
                    {
                        new vid = GetPlayerVehicleID(playerid);
                        if(vid != INVALID_VEHICLE_ID) {
                        GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                        SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE_PARAMS_OFF,bonnet,boot,objective);
                    }
                }
            }
            else ShowPlayerDialog(playerid, VC_MAIN, DIALOG_STYLE_LIST, "Vehicle Control Menu {FF0000}0.3c", "{0000FF}Doors \n{0000FF}Bonnet \n{0000FF}Boot \n{0000FF}Engine \n{0000FF}Alarm \n{0000FF}Objectives \n{0000FF}Neons", "Purchase", "Cancel");
        }
    }
    return 1;
}


BTW:
Hello all, im sorry if this is the wrong section, but is there a streamer that can load up to 20000 objects or more?


Re: Help with dialog + streamer - Stigg - 22.02.2011

https://sampforum.blast.hk/showthread.php?tid=102865

For a superb streamer, unlimited objects, lots of bells and whistles.

Peace...


Re: Help with dialog + streamer - Markx - 22.02.2011

thanks mate, but how to fix those errors?


Re: Help with dialog + streamer - Mike Garber - 22.02.2011

pawn Код:
case 0:
                    {
                        new vid = GetPlayerVehicleID(playerid);
                        if(vid != INVALID_VEHICLE_ID)
            {
                            GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
                            SetVehicleParamsEx(vid,engine,lights,alarm,VEHICLE_PARAMS_ON,bonnet,boot,objective);
            } // You forgot one closing bracket :D

                    }
Sorry for indentation i don't have Pawno on my Mac.


Re: Help with dialog + streamer - Markx - 22.02.2011

Thanks!!!


Re: Help with dialog + streamer - Markx - 22.02.2011

Sorry for duble post but i got this at end of dialog response:

pawn Код:
} //this is lined correctly in my pawn (i dont know why it isnt lined here)
            }
            else ShowPlayerDialog(playerid, VC_MAIN, DIALOG_STYLE_LIST, "Vehicle Control Menu {FF0000}0.3c", "{0000FF}Doors \n{0000FF}Bonnet \n{0000FF}Boot \n{0000FF}Engine \n{0000FF}Alarm \n{0000FF}Objectives \n{0000FF}Neons", "Purchase", "Cancel");
         }
         return 1; //line 418
    }
} //line 420
And i get this:

pawn Код:
C:\Users\Marko\Documents\Server\filterscripts\Vehicle0.3c.pwn(418) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\Marko\Documents\Server\filterscripts\Vehicle0.3c.pwn(418) : warning 215: expression has no effect
C:\Users\Marko\Documents\Server\filterscripts\Vehicle0.3c.pwn(420) : error 054: unmatched closing brace ("}")
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.



Re: Help with dialog + streamer - iggy1 - 22.02.2011

If you post your full dialog response i'll have a look for you.


Re: Help with dialog + streamer - Markx - 22.02.2011

pawn Код:
case NEON_DIALOG:
        {
            if(response)
            {
                switch(listitem)
                {
                    case 0: //Red Neon
                    {
                        SetPVarInt(playerid, "Status", 1);
                        SetPVarInt(playerid, "neon", CreateObject(18647,0,0,0,0,0,0));
                        SetPVarInt(playerid, "neon1", CreateObject(18647,0,0,0,0,0,0));
                        AttachObjectToVehicle(GetPVarInt(playerid, "neon"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                        AttachObjectToVehicle(GetPVarInt(playerid, "neon1"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                        SendClientMessage(playerid, 0xFFFFFFAA, "Neon Light Installed.");
                    }
                    case 1: //Blue neon
                    {
                        SetPVarInt(playerid, "Status", 1);
                        SetPVarInt(playerid, "neon2", CreateObject(18648,0,0,0,0,0,0));
                        SetPVarInt(playerid, "neon3", CreateObject(18648,0,0,0,0,0,0));
                        AttachObjectToVehicle(GetPVarInt(playerid, "neon2"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                        AttachObjectToVehicle(GetPVarInt(playerid, "neon3"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                        SendClientMessage(playerid, 0xFFFFFFAA, "Neon Light Installed.");
                    }
                    case 2: //Yellow neon
                    {
                        SetPVarInt(playerid, "Status", 1);
                        SetPVarInt(playerid, "neon4", CreateObject(18650,0,0,0,0,0,0));
                        SetPVarInt(playerid, "neon5", CreateObject(18650,0,0,0,0,0,0));
                        AttachObjectToVehicle(GetPVarInt(playerid, "neon4"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                        AttachObjectToVehicle(GetPVarInt(playerid, "neon5"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                        SendClientMessage(playerid, 0xFFFFFFAA, "neon installed");
                   
                    }
                    case 3: //Green neon
                    {
                        SetPVarInt(playerid, "Status", 1);
                        SetPVarInt(playerid, "neon6", CreateObject(18649,0,0,0,0,0,0));
                        SetPVarInt(playerid, "neon7", CreateObject(18649,0,0,0,0,0,0));
                        AttachObjectToVehicle(GetPVarInt(playerid, "neon6"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                        AttachObjectToVehicle(GetPVarInt(playerid, "neon7"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                        SendClientMessage(playerid, 0xFFFFFFAA, "Neon Light Installed.");

                    }
                    case 4: //White neon
                    {
                        SetPVarInt(playerid, "Status", 1);
                        SetPVarInt(playerid, "neon8", CreateObject(18652,0,0,0,0,0,0));
                        SetPVarInt(playerid, "neon9", CreateObject(18652,0,0,0,0,0,0));
                        AttachObjectToVehicle(GetPVarInt(playerid, "neon8"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                        AttachObjectToVehicle(GetPVarInt(playerid, "neon9"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                        SendClientMessage(playerid, 0xFFFFFFAA, "Neon Light Installed.");

                    }
                    case 5: //Pink neon
                    {
                        SetPVarInt(playerid, "Status", 1);
                        SetPVarInt(playerid, "neon10", CreateObject(18651,0,0,0,0,0,0));
                        SetPVarInt(playerid, "neon11", CreateObject(18651,0,0,0,0,0,0));
                        AttachObjectToVehicle(GetPVarInt(playerid, "neon10"), GetPlayerVehicleID(playerid), -0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                        AttachObjectToVehicle(GetPVarInt(playerid, "neon11"), GetPlayerVehicleID(playerid), 0.8, 0.0, -0.70, 0.0, 0.0, 0.0);
                        SendClientMessage(playerid, 0xFFFFFFAA, "Neon Light Installed.");

                    }
                    case 6: //Remove Neons
                    {
                        DestroyObject(GetPVarInt(playerid, "neon"));
                        DeletePVar(playerid, "Status");
                        DestroyObject(GetPVarInt(playerid, "neon1"));
                        DeletePVar(playerid, "Status");
                        DestroyObject(GetPVarInt(playerid, "neon2"));
                        DeletePVar(playerid, "Status");
                        DestroyObject(GetPVarInt(playerid, "neon3"));
                        DeletePVar(playerid, "Status");
                        DestroyObject(GetPVarInt(playerid, "neon4"));
                        DeletePVar(playerid, "Status");
                        DestroyObject(GetPVarInt(playerid, "neon5"));
                        DeletePVar(playerid, "Status");
                        DestroyObject(GetPVarInt(playerid, "neon6"));
                        DeletePVar(playerid, "Status");
                        DestroyObject(GetPVarInt(playerid, "neon7"));
                        DeletePVar(playerid, "Status");
                        DestroyObject(GetPVarInt(playerid, "neon8"));
                        DeletePVar(playerid, "Status");
                        DestroyObject(GetPVarInt(playerid, "neon9"));
                        DeletePVar(playerid, "Status");
                        DestroyObject(GetPVarInt(playerid, "neon10"));
                        DeletePVar(playerid, "Status");
                        DestroyObject(GetPVarInt(playerid, "neon11"));
                        DeletePVar(playerid, "Status");
                    }
                }
            }
            else ShowPlayerDialog(playerid, VC_MAIN, DIALOG_STYLE_LIST, "Vehicle Control Menu {FF0000}0.3c", "{0000FF}Doors \n{0000FF}Bonnet \n{0000FF}Boot \n{0000FF}Engine \n{0000FF}Alarm \n{0000FF}Objectives \n{0000FF}Neons", "Purchase", "Cancel");
         }
         return 1;
    }
}



Re: Help with dialog + streamer - iggy1 - 22.02.2011

Full asin function header too. Post everything including this,
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    return 1;
}



Re: Help with dialog + streamer - Markx - 22.02.2011

ok on pm