Dialog getting error after substitution
#1

PHP код:
new dialoglist;
                
format(dialoglist700"Arma\tBalas\tSlot\n\
                %s\t%d\t1\n\
                %s\t%d\t2\n\
                %s\t%d\t3\n\
                %s\t%d\t4\n\
                %s\t%d\t5\n\
                %s\t%d\t6\n\
                %s\t%d\t7\n\
                %s\t%d\t8\n\
                %s\t%d\t9\n\
                %s\t%d\t10"
,weaponName1,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo1],weaponName2,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo2],weaponName3,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo3],weaponName4,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo4],weaponName5,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo5],weaponName6,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo6],weaponName7,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo7],weaponName8,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo8],weaponName9,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo9],weaponName10,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo10]);
                 
ShowPlayerDialog(playeridverarmascarroDIALOG_STYLE_TABLIST_HEADERSdialoglist"Selecionar","Cancelar"); 

PHP код:
C:\Users\Vasco\Downloads\Nova pasta\GM_RP_PT\GM_RP_PT\GM_RP_PT\gamemodes\I-RP.pwn(61072) : error 075input line too long (after substitutions)
C:\Users\Vasco\Downloads\Nova pasta\GM_RP_PT\GM_RP_PT\GM_RP_PT\gamemodes\I-RP.pwn(61073) : error 035argument type mismatch (argument 1)
C:\Users\Vasco\Downloads\Nova pasta\GM_RP_PT\GM_RP_PT\GM_RP_PT\gamemodes\I-RP.pwn(61075) : error 035argument type mismatch (argument 4)
C:\Users\Vasco\Downloads\Nova pasta\GM_RP_PT\GM_RP_PT\GM_RP_PT\gamemodes\I-RP.pwn(61062) : warning 203symbol is never used"dialoglist"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
3 Errors

Reply
#2

PHP код:
                    new dialoglist[700], test[128]; 
                
strcat(dialoglist"Arma\tBalas\tSlot\n");
                
format(test128"%s\t%d\t1\n",weaponName1,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo1]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t2\n",weaponName2,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo2]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t3\n",weaponName3,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo3]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t4\n",weaponName4,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo4]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t5\n",weaponName5,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo5]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t6\n",weaponName6,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo6]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t7\n",weaponName7,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo7]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t8\n",weaponName8,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo8]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t9\n",weaponName9,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo9]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t10\n",weaponName10,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo10]);
                
strcat(dialoglisttest);
                
ShowPlayerDialog(playeridverarmascarroDIALOG_STYLE_TABLIST_HEADERSdialoglist"Selecionar","Cancelar"); 
Reply
#3

PHP код:
%s\t%d\t10",weaponName1,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo1],weaponName2,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo2],weaponName3,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo3],weaponName4,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo4],weaponName5,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo5],weaponName6,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo6],weaponName7,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo7],weaponName8,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo8],weaponName9,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo9],weaponName10,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo10]); 
This line is too long
EDIT: use what Luicy suggested
Reply
#4

PHP код:
C:\Users\Vasco\Downloads\Nova pasta\GM_RP_PT\GM_RP_PT\GM_RP_PT\gamemodes\I-RP.pwn(61084) : warning 202number of arguments does not match definition
Pawn compiler 3.2.3664              Copyright 
(c1997-2006ITB CompuPhase
Header size
:          19876 bytes
Code size
:          4442352 bytes
Data size
:          6690312 bytes
Stack
/heap size:      16384 bytesestimated maxusageunknowndue to recursion
Total requirements
:11168924 bytes
1 Warning

warning is at ShowPlayerDialog
Reply
#5

PHP код:
                new dialoglist[700], test[128]; 
                
strcat(dialoglist"Arma\tBalas\tSlot\n");
                
format(test128"%s\t%d\t1\n",weaponName1,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo1]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t2\n",weaponName2,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo2]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t3\n",weaponName3,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo3]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t4\n",weaponName4,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo4]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t5\n",weaponName5,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo5]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t6\n",weaponName6,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo6]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t7\n",weaponName7,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo7]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t8\n",weaponName8,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo8]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t9\n",weaponName9,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo9]);
                
strcat(dialoglisttest);
                
format(test128"%s\t%d\t10\n",weaponName10,DynamicCarsWeapons[GetPlayerVehicleID(playerid) -1][cAmmo10]);
                
strcat(dialoglisttest);
                
ShowPlayerDialog(playeridverarmascarroDIALOG_STYLE_TABLIST_HEADERS"hi"dialoglist"Selecionar","Cancelar"); 
Reply
#6

Thanks
Reply
#7

Quote:
Originally Posted by GunZsmd
Посмотреть сообщение
Thanks
You're welcome.
Reply
#8



Not quite how i wanted. They are all 1 slot to the left. 1-2-3-4-5-6-7-8-9-10 should be at the last slot.
Reply
#9

bump
Reply
#10

Stop bumping the same hour.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)