Spawning stuff - Errors
#1

can someone help me i get these errors
Код:
C:\Documents and Settings\User\Desktop\gun.pwn(92) : error 075: input line too long (after substitutions)
C:\Documents and Settings\User\Desktop\gun.pwn(93) : error 037: invalid string (possibly non-terminated string)
C:\Documents and Settings\User\Desktop\gun.pwn(93) : error 017: undefined symbol "Brass"
C:\Documents and Settings\User\Desktop\gun.pwn(93) : error 017: undefined symbol "Knuckles"
C:\Documents and Settings\User\Desktop\gun.pwn(93) : fatal error 107: too many error messages on one line

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


5 Errors.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid, DIALOG_Gun, DIALOG_STYLE_LIST, "{00FF00}List {0000FF}Of {FF0000}Weapons", "Brass Knuckles\nGold Club\nNite Stick\nKnife\nBaseball Bat\nShovel\nPool Cue\nKatana\nChainsaw\nPurple Dildo\nSmall Vibrator\nLarge Vibrator\nFlowers\nCane\nGrenade\nTear Gas\nMolotov Cocktail\n9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawn-Off Shotgun\nCombat Shotgun\nMicro SMG\nMP5 / SMG\nAK47\nM4\nTec9\nCountry Rifle\nSniper Rifle\nRocket Launcher\nHeat Seaker\nFlamethrower\nMinigun\nSatchel Charge\nDetonator\nSpray Can\nFire Extinguisher\nCamera\nNightvision Goggles\nThermal Goggles\nParachute", "Spawn Item", "Close");
        return 1;
    }
    return 0;
}
Reply
#2

The string you want to show in the dialog is too big (it propably exceeds the max. line limit in a list dialog).
Reply
#3

Whats the max you can get?
Reply
#4

Make Page 2 option by changing the button 2 to Next Page!

OnDialogResponse of this dialogid!

Add this
pawn Код:
if(!response) return ShowPlayerDialog(playerid, DIALOG_Gun2, DIALOG_STYLE_LIST, "{00FF00}List {0000FF}Of {FF0000}Weapons", "Brass Knuckles\nGold Club\nNite Stick\nKnife\nBaseball Bat\nShovel\nPool Cue\nKatana\nChainsaw", "Spawn Item", "Close");
Now add one more dialog response for this dialogid! use it the way you want!

EDIT: Change the weapons in the dialog2! and dont forget to add #define DIALOG_Gun2 NUMBERYOUWANT in your gm!
Reply
#5

Or you could do:

pawn Код:
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        new str[800];
        format(str, sizeof(str), "Brass Knuckles\nGold Club\nNite Stick\nKnife\nBaseball Bat\nShovel\nPool Cue\nKatana\nChainsaw\nPurple Dildo\nSmall Vibrator\nLarge Vibrator\n");
        format(str, sizeof(str), "%sFlowers\nCane\nGrenade\nTear Gas\nMolotov Cocktail\n9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawn-Off Shotgun\nCombat Shotgun\nMicro SMG\n", str);
        format(str, sizeof(str), "%sMP5 / SMG\nAK47\nM4\nTec9\nCountry Rifle\nSniper Rifle\nRocket Launcher\nHeat Seaker\nFlamethrower\nMinigun\nSatchel Charge\nDetonator\n", str);
        format(str, sizeof(str), "%sSpray Can\nFire Extinguisher\nCamera\nNightvision Goggles\nThermal Goggles\nParachute", str);
        ShowPlayerDialog(playerid, DIALOG_Gun, DIALOG_STYLE_LIST, "{00FF00}List {0000FF}Of {FF0000}Weapons", str, "Spawn Item", "Close");
        return 1;
    }
Reply
#6

Quote:
Originally Posted by SpiritEvil
Посмотреть сообщение
Or you could do:

pawn Код:
if (strcmp("/mycommand", cmdtext, true, 10) == 0)
    {
        new str[800];
        format(str, sizeof(str), "Brass Knuckles\nGold Club\nNite Stick\nKnife\nBaseball Bat\nShovel\nPool Cue\nKatana\nChainsaw\nPurple Dildo\nSmall Vibrator\nLarge Vibrator\n");
        format(str, sizeof(str), "%sFlowers\nCane\nGrenade\nTear Gas\nMolotov Cocktail\n9mm\nSilenced 9mm\nDesert Eagle\nShotgun\nSawn-Off Shotgun\nCombat Shotgun\nMicro SMG\n", str);
        format(str, sizeof(str), "%sMP5 / SMG\nAK47\nM4\nTec9\nCountry Rifle\nSniper Rifle\nRocket Launcher\nHeat Seaker\nFlamethrower\nMinigun\nSatchel Charge\nDetonator\n", str);
        format(str, sizeof(str), "%sSpray Can\nFire Extinguisher\nCamera\nNightvision Goggles\nThermal Goggles\nParachute", str);
        ShowPlayerDialog(playerid, DIALOG_Gun, DIALOG_STYLE_LIST, "{00FF00}List {0000FF}Of {FF0000}Weapons", str, "Spawn Item", "Close");
        return 1;
    }
Wouldn't help as it still exceeds the max. lines limit.
Reply
#7

Quote:
Originally Posted by Drebin
Посмотреть сообщение
Wouldn't help as it still exceeds the max. lines limit.
No it doesn't. I tested that and it works perfectly The guy was getting the error because the line was too long, not because the dialog cannot display the whole thing.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)