SA-MP Forums Archive
im crap with dialog response - 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: im crap with dialog response (/showthread.php?tid=361679)



im crap with dialog response - thefatshizms - 21.07.2012

Hello, i dont know what it is with me and dialog response but im ALWAYS getting errors using it lol anyway enough of my life story :YAWN: here are my errors if someone will kindly help
Код:
C:\Users\iphone\Desktop\Pawn Scripting\gamemodes\Sfcnr.pwn(2106) : error 033: array must be indexed (variable "gTeam")
C:\Users\iphone\Desktop\Pawn Scripting\gamemodes\Sfcnr.pwn(2108) : error 029: invalid expression, assumed zero
C:\Users\iphone\Desktop\Pawn Scripting\gamemodes\Sfcnr.pwn(2108) : warning 215: expression has no effect
C:\Users\iphone\Desktop\Pawn Scripting\gamemodes\Sfcnr.pwn(2108) : error 001: expected token: ";", but found ")"
C:\Users\iphone\Desktop\Pawn Scripting\gamemodes\Sfcnr.pwn(2108) : error 029: invalid expression, assumed zero
C:\Users\iphone\Desktop\Pawn Scripting\gamemodes\Sfcnr.pwn(2108) : 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 Код:
if(dialogid == DIALOG_DRUGS)
    {
        if(!response) return SendClientMessage(playerid, -1, "You have closed the drug menu");
        if(response)
        {
            switch(listitem)
            {
                case 0:
                {
                    if(gTeam == DRUG)
                    {
                        GetPlayerMoney(playerid, < 1000) return SendClientMessage(playerid, -1, "You need $1000 for this");
                        GivePlayerMoney(playerid, -1000);
                        SendClientMessage(playerid, -1, "Thank you for buying from quicky drug store");
                        return 1;
                    }
                    else if(!gTeam == DRUG)
                    {
                        SendClientMessage(playerid, -1, "Your not a drug dealer you cannot use this store");
                        return 1;
                    }
                }
                case 1:
                {
                    print("test");
                    return 1;
                }
                case 2:
                {
                    print("LOLOLDDDD");
                    return 1;
                }
            }
        }
    }
xDD sorry about the prints i was just putting them there cause im putting the other code there after errors gone


Re: im crap with dialog response - ViniBorn - 21.07.2012

Wouldn't gTeam [playerid] ?


Re: im crap with dialog response - thefatshizms - 21.07.2012

OMG thanks why do i keep doing that?!? lol anyway now got 4 errors
Код:
C:\Users\iphone\Desktop\Pawn Scripting\gamemodes\Sfcnr.pwn(2108) : error 029: invalid expression, assumed zero
C:\Users\iphone\Desktop\Pawn Scripting\gamemodes\Sfcnr.pwn(2108) : warning 215: expression has no effect
C:\Users\iphone\Desktop\Pawn Scripting\gamemodes\Sfcnr.pwn(2108) : error 001: expected token: ";", but found ")"
C:\Users\iphone\Desktop\Pawn Scripting\gamemodes\Sfcnr.pwn(2108) : error 029: invalid expression, assumed zero
C:\Users\iphone\Desktop\Pawn Scripting\gamemodes\Sfcnr.pwn(2108) : fatal error 107: too many error messages on one line

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


4 Errors.



Re: im crap with dialog response - Why - 21.07.2012

Show us line 2108?


Re: im crap with dialog response - Erpis - 21.07.2012

add on line 2108 in the end: ); but not )


Re: im crap with dialog response - thefatshizms - 21.07.2012

line 2108
Код:
GetPlayerMoney(playerid, < 1000) return SendClientMessage(playerid, -1, "You need $1000 for this");



Re: im crap with dialog response - ViniBorn - 21.07.2012

pawn Код:
if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, -1, "You need $1000 for this");



Re: im crap with dialog response - thefatshizms - 21.07.2012

same errors :/


Re: im crap with dialog response - ViniBorn - 21.07.2012

Show the line 2107


Re: im crap with dialog response - thefatshizms - 21.07.2012

its a bracket so ill show it and line 2106
pawn Код:
if(gTeam[playerid] == DRUG)
                    {