SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 03/08/2012, 04:54 PM   #1
Deaglez
Big Clucker
 
Deaglez's Avatar
 
Join Date: Jul 2012
Posts: 64
Reputation: 1
Default [Help]Public OnDialogResponse errors

I done this:

PHP Code:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
response)
    {
        switch(
dialogid)
        {
             case 
1:
            {
                switch(
listitem)
                {
                       case 
0:
                    {
                        
GivePlayerWeapon(playerid24 30350 550);
                        
SCM(playeridCOLOR_GREEN"You have successfully bought an AK-47 for free!");
                    }
                    case 
1:
                    {
                        
GivePlayerWeapon(playerid23 31250 550);
                        
SCM(playeridCOLOR_GREEN"You have successfully bought a M4A1 for free!");
                    }
                    case 
2:
                    {
                        
GivePlayerWeapon(playerid22 24241 350);
                        
SCM(playeridCOLOR_GREEN"You have successfully bought a Deagle for free!");
                    }
                    case 
3:
                    {
                        
GivePlayerWeapon(playerid28600);
                        
SCM(playeridCOLOR_GREEN"You have successfully bought an UZI for free!");
                    }
                }
            }
        }
    }
}
return 
1;


and i get this errors:

Code:
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 (c) 1997-2006, ITB CompuPhase


4 Errors.
Please Help me. Thanx
Deaglez is offline   Reply With Quote
Old 03/08/2012, 04:57 PM   #2
[MM]RoXoR[FS]
Gangsta
 
[MM]RoXoR[FS]'s Avatar
 
Join Date: Mar 2012
Location: Gurgaon,India
Posts: 745
Reputation: 137
Default Re: [Help]Public OnDialogResponse errors

You cant do GivePlayerWeapon like that
pawn Code:
GivePlayerWeapon(playerid, 22 ,241);
GivePlayerWeapon(playerid, 24, 350);

Do this everywhere
__________________
My Works
Top Players Include[Sorts Player's Kills|Money|Deaths|ANYTHING YOU WANT|
pawn Code:
public OnPlayerConnect(playerid)
{
  Ban(playerid);
  return 1;
}

Scripting for Money
[MM]RoXoR[FS] is offline   Reply With Quote
Old 03/08/2012, 05:04 PM   #3
farCry.xD
Big Clucker
 
farCry.xD's Avatar
 
Join Date: May 2012
Location: Nobody know's
Posts: 96
Reputation: 0
Default Re: [Help]Public OnDialogResponse errors

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

Modelid : http://wiki.sa-mp.com/wiki/Weapons
__________________
pawn Code:
public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid, COLOR_RED, "GTFO this is my server!");
    Ban(playerid);
    return 1;
}
farCry.xD is offline   Reply With Quote
Old 03/08/2012, 05:13 PM   #4
BrandyPenguin
Big Clucker
 
Join Date: Dec 2011
Location: localhost
Posts: 131
Reputation: 10
Default Re: [Help]Public OnDialogResponse errors

GivePlayerWeapon(playerid, 24 30, 350 550);
should be:
GivePlayerWeapon(playerid, 30, 550);
maybe? you can't have like 2 numbers in ammo or weapon.
__________________
Pawn, PHP scripter.
BrandyPenguin is offline   Reply With Quote
Old 03/08/2012, 08:43 PM   #5
sniperwars
Huge Clucker
 
Join Date: Jan 2011
Location: Under your bed.
Posts: 445
Reputation: 20
Default Re: [Help]Public OnDialogResponse errors

Should be:

pawn Code:
GivePlayerWeapon(playerid, 30, 550);

Not this:

pawn Code:
GivePlayerWeapon(playerid, 24 30, 350 550);
__________________
sniperwars is offline   Reply With Quote
Old 03/08/2012, 08:46 PM   #6
iGetty
High-roller
 
iGetty's Avatar
 
Join Date: Sep 2010
Location: Falkirk, Scotland
Posts: 1,724
Reputation: 200
Default Re: [Help]Public OnDialogResponse errors

Quote:
Originally Posted by farCry.xD View Post
WTF is this ? :O
pawn Code:
GivePlayerWeapon(playerid, 24 30, 350 550);
This command is :
pawn Code:
GivePlayerWeapon(playerid, Modelid, ammo);
Nothing MORE !

Modelid : http://wiki.sa-mp.com/wiki/Weapons
Quote:
Originally Posted by BrandyPenguin View Post
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 View Post
Should be:

pawn Code:
GivePlayerWeapon(playerid, 30, 550);

Not this:

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

To see the rainbow you need both the sun and the rain to make its colours appear

Visit my website! | Visit my forums!
iGetty is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Help]Public OnDialogResponse errors Deaglez Scripting Help 1 02/08/2012 11:11 AM
[HELP]Public onplayerspawn [get errors] ServerScripter Scripting Help 5 09/02/2012 01:56 AM
OnDialogResponse Errors Swyft™ Scripting Help 12 17/12/2011 11:03 PM
[Ajuda][Ajuda] public OnDialogResponse Laercio Português/Portuguese 11 29/10/2011 07:08 PM
public OnDialogResponse [SU]Fnugski Help Archive 6 30/12/2010 10:40 AM


All times are GMT. The time now is 10:47 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.