SA-MP Forums Archive
Pawno errors - 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)
+--- Thread: Pawno errors (/showthread.php?tid=588654)



Pawno errors - xTURBOx - 11.09.2015

This is my code
PHP код:
{
    
#if ONLY_ADMIN == true
    
if(!ADMIN) return 0;
    
#endif
    
ShowPlayerDialog(playerid,TELE_DIALOG,DIALOG_STYLE_LIST,"Interior Teleports","Shamal\nAndromeda\nAmmunation booths\nAmmunation range\nArea51\nlibertycityoutside\nlibertycityinside\nwarehouse 1\nwarehouse 2\nbank\ndirt track\npleasure domes\nbattle field\nSan Fierro Police HQ\nLos Santos Police HQ\nLas Ventras Police HQ\n8track\nBlood bowl\nKickstart\nHiddenroom\nWoozie's Office\nPlanning Department\nLos Santos Gym\nLas Ventrus Gym\nSan Fierro Gym\nCrack Factory\nAirport Ticket Desk\nAirport baggage reclaim\n Meat Factory\nBetting Shop","Select","Close");
    return 
1;
} 
it gives me
Код:
D:\server scripts\my filterscripts\intele.pwn(80) : error 075: input line too long (after substitutions)
D:\server scripts\my filterscripts\intele.pwn(81) : error 037: invalid string (possibly non-terminated string)
D:\server scripts\my filterscripts\intele.pwn(81) : error 017: undefined symbol "Shamal"
D:\server scripts\my filterscripts\intele.pwn(81) : error 029: invalid expression, assumed zero
D:\server scripts\my filterscripts\intele.pwn(81) : fatal error 107: too many error messages on one line

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


5 Errors.
line 80 is #endif
line 81 is
Код:
ShowPlayerDialog(playerid,TELE_DIALOG,DIALOG_STYLE_LIST,"Interior Teleports","Shamal\nAndromeda\nAmmunation booths\nAmmunation range\nArea51\nlibertycityoutside\nlibertycityinside\nwarehouse 1\nwarehouse 2\nbank\ndirt track\npleasure domes\nbattle field\nSan Fierro Police HQ\nLos Santos Police HQ\nLas Ventras Police HQ\n8track\nBlood bowl\nKickstart\nHiddenroom\nWoozie's Office\nPlanning Department\nLos Santos Gym\nLas Ventrus Gym\nSan Fierro Gym\nCrack Factory\nAirport Ticket Desk\nAirport baggage reclaim\n Meat Factory\nBetting Shop","Select","Close");



Re: Pawno errors - MinDex - 11.09.2015

Line is too long.

Try this :

Код HTML:
		    new msg1[150];
		    new msg2[150];
		    new msg3[150];
		    format(msg1, sizeof(msg1), "Shamal\nAndromeda\nAmmunation booths\nAmmunation range\nArea51\nlibertycityoutside\nlibertycityinside\nwarehouse 1\nwarehouse 2\nbank\ndirt track\npleasure domes\nbattle field\nSan Fierro Police HQ\nLos Santos Police HQ\nLas Ventras Police HQ");
		    format(msg2, sizeof(msg2), "\n8track\nBlood bowl\nKickstart\nHiddenroom\nWoozie's Office\nPlanning Department\nLos Santos Gym\nLas Ventrus Gym\nSan Fierro Gym\nCrack Factory\nAirport Ticket Desk\nAirport baggage reclaim\n Meat Factory\nBetting Shop");
		    format(msg3, sizeof(msg3), "%s%s", msg1, msg2);
		    ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX ,"Interior Teleports", msg3, "Select", "Close");
Not tested.


Re: Pawno errors - Threshold - 11.09.2015

Quote:
Originally Posted by MinDex
Посмотреть сообщение
Line is too long.

Try this :

Код HTML:
		    new msg1[150];
		    new msg2[150];
		    new msg3[150];
		    format(msg1, sizeof(msg1), "Shamal\nAndromeda\nAmmunation booths\nAmmunation range\nArea51\nlibertycityoutside\nlibertycityinside\nwarehouse 1\nwarehouse 2\nbank\ndirt track\npleasure domes\nbattle field\nSan Fierro Police HQ\nLos Santos Police HQ\nLas Ventras Police HQ");
		    format(msg2, sizeof(msg2), "\n8track\nBlood bowl\nKickstart\nHiddenroom\nWoozie's Office\nPlanning Department\nLos Santos Gym\nLas Ventrus Gym\nSan Fierro Gym\nCrack Factory\nAirport Ticket Desk\nAirport baggage reclaim\n Meat Factory\nBetting Shop");
		    format(msg3, sizeof(msg3), "%s%s", msg1, msg2);
		    ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX ,"Interior Teleports", msg3, "Select", "Close");
Not tested.
What No... just... no...

pawn Код:
{
    #if ONLY_ADMIN == true
    if(!ADMIN) return 0;
    #endif
    ShowPlayerDialog(playerid, TELE_DIALOG, DIALOG_STYLE_LIST, "Interior Teleports",
        "Shamal\nAndromeda\nAmmunation booths\nAmmunation range\nArea51\nlibertycityoutside\nlibertycityinside\nwarehouse 1\nwarehouse 2\nbank\ndirt track\npleasure domes\nbattle field\nSan Fierro Police HQ\nLos Santos Police HQ\nLas Ventras Police HQ\n8track\nBlood bowl\nKickstart\nHiddenroom\nWoozie's Office\nPlanning Department\nLos Santos Gym\nLas Ventrus Gym\nSan Fierro Gym\nCrack Factory\nAirport Ticket Desk\nAirport baggage reclaim\n Meat Factory\nBetting Shop",
        "Select", "Close");
    return 1;
}



Re: Pawno errors - IceBilizard - 11.09.2015

try this

pawn Код:
{
    #if ONLY_ADMIN == true
    if(!ADMIN) return 0;
    #endif
    new tstr[300];//You can increase it
    format(tstr, sizeof(tstr), "%sShamal\nAndromeda\nAmmunation booths\nAmmunation range\nArea51\nlibertycityoutside\nlibertycityinside\nwarehouse 1\nwarehouse 2", tstr);
    format(tstr, sizeof(tstr), "%sBank\ndirt track\npleasure domes\nbattle field\nSan Fierro Police HQ\nLos Santos Police HQ\nLas Ventras Police HQ\n8track", tstr);
    format(tstr, sizeof(tstr), "%sBlood bowl\nKickstart\nHiddenroom\nWoozie's Office\nPlanning Department\nLos Santos Gym\nLas Ventrus Gym\nSan Fierro Gym", tstr);
    format(tstr, sizeof(tstr), "%s\nCrack Factory\nAirport Ticket Desk\nAirport baggage reclaim\n Meat Factory\nBetting Shop", tstr);
    ShowPlayerDialog(playerid,TELE_DIALOG,DIALOG_STYLE_LIST,"Interior Teleports",tstr,"Select","Close");
    return 1;

}



Re: Pawno errors - Karolukas123 - 11.09.2015

MinDex wtf you here write.. why you creating 3 new... you can do it it easy and not to use new


Re: Pawno errors - Threshold - 11.09.2015

There is no need for variables or format here, just simply separate the lines...


Re: Pawno errors - xTURBOx - 12.09.2015

Quote:
Originally Posted by Threshold
Посмотреть сообщение
What No... just... no...

pawn Код:
{
    #if ONLY_ADMIN == true
    if(!ADMIN) return 0;
    #endif
    ShowPlayerDialog(playerid, TELE_DIALOG, DIALOG_STYLE_LIST, "Interior Teleports",
        "Shamal\nAndromeda\nAmmunation booths\nAmmunation range\nArea51\nlibertycityoutside\nlibertycityinside\nwarehouse 1\nwarehouse 2\nbank\ndirt track\npleasure domes\nbattle field\nSan Fierro Police HQ\nLos Santos Police HQ\nLas Ventras Police HQ\n8track\nBlood bowl\nKickstart\nHiddenroom\nWoozie's Office\nPlanning Department\nLos Santos Gym\nLas Ventrus Gym\nSan Fierro Gym\nCrack Factory\nAirport Ticket Desk\nAirport baggage reclaim\n Meat Factory\nBetting Shop",
        "Select", "Close");
    return 1;
}
thanks a lot it worked