need help
#1

why is this not working
Код:
public OnPlayerRequestClass(playerid, classid)
{
	SetPlayerPos(playerid, -1296.0145,2541.9973,87.7422);
	SetPlayerCameraPos(playerid, -1290.0840,2541.5496,87.3370);
	SetPlayerCameraLookAt(playerid, -1296.0145,2541.9973,87.7422);
	
if(classid == 115)
{
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Skin","This skin requers a password !\nType down the correct password to choose it !,"OK","Cancel");
}
	return 1;
}
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(response);
{
switch(dialogid);
{
case 1:
{
if(strval(inputtext) == Planes);
{
SendClientMessage(playerid,COLOR_WHITE,"Correct Password. Skin taken.");
SetPlayerSkin(playerid,YOURSKIN);
TogglePlayerControllable(playerid,true);
TogglePlayerSpectating(playerid,0);
SetCameraBehindPlayer(playerid);
SpawnPlayer(playerid);
}
else
{
SendClientMessage(playerid,COLOR_GREY,"Invalid Password !");
return 1;
}
}
}
}
	return 1;
}
Reply
#2

Use strcmp to compare two strings.

Please indent or use this please.
Reply
#3

Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPlayerPos(playerid, -1296.0145,2541.9973,87.7422);
    SetPlayerCameraPos(playerid, -1290.0840,2541.5496,87.3370);
    SetPlayerCameraLookAt(playerid, -1296.0145,2541.9973,87.7422);

    if(classid == 115) {
        ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Skin","This skin requers a password !\nType down the correct password to choose it !,"OK","Cancel");
    }
    return 1;
}
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(response);
    {
        switch(dialogid);
        {
            case 1:
            {
                if(strval(inputtext) == Planes);
                {
                    SendClientMessage(playerid,COLOR_WHITE,"Correct Password. Skin taken.");
                    SetPlayerSkin(playerid,YOURSKIN);
                    TogglePlayerControllable(playerid,true);
                    TogglePlayerSpectating(playerid,0);
                    SetCameraBehindPlayer(playerid);
                    SpawnPlayer(playerid);
                }
                else {
                    SendClientMessage(playerid,COLOR_GREY,"Invalid Password !");
                    return 1;
                }
            }
        }
    }
    return 1;
}
Код:
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\gamemodes\PurpleMonkeyBubbles.pwn(59) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\gamemodes\PurpleMonkeyBubbles.pwn(83) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\gamemodes\PurpleMonkeyBubbles.pwn(83) : error 017: undefined symbol "OK"
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\gamemodes\PurpleMonkeyBubbles.pwn(83) : warning 215: expression has no effect
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\gamemodes\PurpleMonkeyBubbles.pwn(83) : error 001: expected token: ";", but found "-identifier-"
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\gamemodes\PurpleMonkeyBubbles.pwn(83) : fatal error 107: too many error messages on one line
whats wrong with this?
Reply
#4

anyone? please
Reply
#5

change your code tags for pawn [ pawn]

You're missing a " here:
pawn Код:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Skin","This skin requers a password !\nType down the correct password to choose it !,"OK","Cancel");
Just after the !

What's on line 53?
Reply
#6

http://pastebin.com/YkEw0nfv
Reply
#7

That's not really helping..
Reply
#8

i fixed it
Код:
ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Skin","This skin requers a password !"\nType down the correct password to choose it !,"Ok","Cancel");
    }
but now it says
Код:
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\gamemodes\PurpleMonkeyBubbles.pwn(59) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\gamemodes\PurpleMonkeyBubbles.pwn(83) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\gamemodes\PurpleMonkeyBubbles.pwn(83) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\gamemodes\PurpleMonkeyBubbles.pwn(83) : error 017: undefined symbol "nType"
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\gamemodes\PurpleMonkeyBubbles.pwn(83) : fatal error 107: too many error messages on one line
Reply
#9

Sorry, I obviously meant the second !

pawn Код:
"This skin requers a password !"\nType down the correct password to choose it !
should be
pawn Код:
"This skin requers a password !\nType down the correct password to choose it !"
Quote:

This forum requires that you wait 120 seconds between posts. Please try again in 75 seconds.

:/
Reply
#10

mate for this C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\gamemodes\PurpleMonkeyBubbles.pwn(59) : warning 202: number of arguments does not match definition
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\gamemodes\PurpleMonkeyBubbles.pwn(83) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\gamemodes\PurpleMonkeyBubbles.pwn(83) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\gamemodes\PurpleMonkeyBubbles.pwn(83) : error 017: undefined symbol "nType"
C:\Documents and Settings\Owner.OWNER-8664051FA\Desktop\Samp server 0.3b R2\gamemodes\PurpleMonkeyBubbles.pwn(83) : fatal error 107: too many error messages on one line

im ssending pms i get reply quicker n i no how n im willing to share my cripts or help you with yours if there not realesd
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)