SA-MP Forums Archive
[Help]Public OnDialogResponse 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: [Help]Public OnDialogResponse errors (/showthread.php?tid=365615)



[Help]Public OnDialogResponse errors - Deaglez - 03.08.2012

I done this:

PHP код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(
response)
    {
        switch(
dialogid)
        {
             case 
1:
            {
                switch(
listitem)
                {
                       case 
0:
                    {
                        
GivePlayerWeapon(playerid, 24 30, 350 550);
                        
SCM(playerid, COLOR_GREEN, "You have successfully bought an AK-47 for free!");
                    }
                    case 
1:
                    {
                        
GivePlayerWeapon(playerid, 23 31, 250 550);
                        
SCM(playerid, COLOR_GREEN, "You have successfully bought a M4A1 for free!");
                    }
                    case 
2:
                    {
                        
GivePlayerWeapon(playerid, 22 24, 241 350);
                        
SCM(playerid, COLOR_GREEN, "You have successfully bought a Deagle for free!");
                    }
                    case 
3:
                    {
                        
GivePlayerWeapon(playerid, 28, 600);
                        
SCM(playerid, COLOR_GREEN, "You have successfully bought an UZI for free!");
                    }
                }
            }
        }
    }
}
return 
1;
} 
and i get this errors:

Код:
C:\Users\Zhen\Desktop\GTA - San Andreas\SA-MP Server\gamemodes\tutorial4.pwn(458) : error 001: expected token: ",", but found "-integer value-"
C:\Users\Zhen\Desktop\GTA - San Andreas\SA-MP Server\gamemodes\tutorial4.pwn(458) : warning 215: expression has no effect
C:\Users\Zhen\Desktop\GTA - San Andreas\SA-MP Server\gamemodes\tutorial4.pwn(458) : warning 215: expression has no effect
C:\Users\Zhen\Desktop\GTA - San Andreas\SA-MP Server\gamemodes\tutorial4.pwn(458) : error 001: expected token: ";", but found "-integer value-"
C:\Users\Zhen\Desktop\GTA - San Andreas\SA-MP Server\gamemodes\tutorial4.pwn(458) : warning 215: expression has no effect
C:\Users\Zhen\Desktop\GTA - San Andreas\SA-MP Server\gamemodes\tutorial4.pwn(458) : error 001: expected token: ";", but found ")"
C:\Users\Zhen\Desktop\GTA - San Andreas\SA-MP Server\gamemodes\tutorial4.pwn(458) : fatal error 107: too many error messages on one line

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


4 Errors.
Please Help me. Thanx


Re: [Help]Public OnDialogResponse errors - [MM]RoXoR[FS] - 03.08.2012

You cant do GivePlayerWeapon like that
pawn Код:
GivePlayerWeapon(playerid, 22 ,241);
GivePlayerWeapon(playerid, 24, 350);
Do this everywhere


Re: [Help]Public OnDialogResponse errors - farCry.xD - 03.08.2012

WTF is this ? :O
pawn Код:
GivePlayerWeapon(playerid, 24 30, 350 550);
This command is :
pawn Код:
GivePlayerWeapon(playerid, Modelid, ammo);
Nothing MORE !

Modelid : https://sampwiki.blast.hk/wiki/Weapons


Re: [Help]Public OnDialogResponse errors - BrandyPenguin - 03.08.2012

GivePlayerWeapon(playerid, 24 30, 350 550);
should be:
GivePlayerWeapon(playerid, 30, 550);
maybe? you can't have like 2 numbers in ammo or weapon.


Re: [Help]Public OnDialogResponse errors - sniperwars - 03.08.2012

Should be:

pawn Код:
GivePlayerWeapon(playerid, 30, 550);
Not this:

pawn Код:
GivePlayerWeapon(playerid, 24 30, 350 550);



Re: [Help]Public OnDialogResponse errors - iGetty - 03.08.2012

Quote:
Originally Posted by farCry.xD
Посмотреть сообщение
WTF is this ? :O
pawn Код:
GivePlayerWeapon(playerid, 24 30, 350 550);
This command is :
pawn Код:
GivePlayerWeapon(playerid, Modelid, ammo);
Nothing MORE !

Modelid : https://sampwiki.blast.hk/wiki/Weapons
Quote:
Originally Posted by BrandyPenguin
Посмотреть сообщение
GivePlayerWeapon(playerid, 24 30, 350 550);
should be:
GivePlayerWeapon(playerid, 30, 550);
maybe? you can't have like 2 numbers in ammo or weapon.
Quote:
Originally Posted by sniperwars
Посмотреть сообщение
Should be:

pawn Код:
GivePlayerWeapon(playerid, 30, 550);
Not this:

pawn Код:
GivePlayerWeapon(playerid, 24 30, 350 550);
How many people need to tell him the same damn thing?..