SA-MP Forums Archive
Three 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: Three errors (/showthread.php?tid=338826)



Three errors - HighPitchedVoice - 01.05.2012

Hello there everyone, Today I tried to script /weapontraining but I got a few errors all the time somewhy..

Error lines;
pawn Код:
C:\Documents and Settings\Lindvall\Skrivbord\Raven's Roleplay 0.3c V4.2\gamemodes\larp.pwn(59291) : error 001: expected token: ")", but found "{"
C:\Documents and Settings\Lindvall\Skrivbord\Raven'
s Roleplay 0.3c V4.2\gamemodes\larp.pwn(59292) : error 027: invalid character constant
C:\Documents and Settings\Lindvall\Skrivbord\Raven's Roleplay 0.3c V4.2\gamemodes\larp.pwn(59292) : error 027: invalid character constant
Pawn compiler 3.2.3664          Copyright © 1997-2006, ITB CompuPhase


3 Errors.
The scripting code is;
pawn Код:
if(strcmp(cmd, "/weapontraining", true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid,5,300.5705,-134.0464,1004.0625)
        {
            ShowPlayerDialog(playerid, 6666,DIALOG_STYLE_MSGBOX, "Which firearm would you like to train?\n Colt45\Pumpshotgun", "Choose","Cancel");
        }
        return 1;
    }



Re: Three errors - Dan. - 01.05.2012

You typed:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,5,300.5705,-134.0464,1004.0625)
But it should be:
pawn Код:
if(IsPlayerInRangeOfPoint(playerid,5,300.5705,-134.0464,1004.0625))



Re: Three errors - Mark™ - 01.05.2012

Quote:
Originally Posted by HighPitchedVoice
Посмотреть сообщение
Hello there everyone, Today I tried to script /weapontraining but I got a few errors all the time somewhy..

Error lines;
pawn Код:
C:\Documents and Settings\Lindvall\Skrivbord\Raven's Roleplay 0.3c V4.2\gamemodes\larp.pwn(59291) : error 001: expected token: ")", but found "{"
C:\Documents and Settings\Lindvall\Skrivbord\Raven'
s Roleplay 0.3c V4.2\gamemodes\larp.pwn(59292) : error 027: invalid character constant
C:\Documents and Settings\Lindvall\Skrivbord\Raven's Roleplay 0.3c V4.2\gamemodes\larp.pwn(59292) : error 027: invalid character constant
Pawn compiler 3.2.3664          Copyright © 1997-2006, ITB CompuPhase


3 Errors.
The scripting code is;
pawn Код:
if(strcmp(cmd, "/weapontraining", true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid,5,300.5705,-134.0464,1004.0625)
        {
            ShowPlayerDialog(playerid, 6666,DIALOG_STYLE_MSGBOX, "Which firearm would you like to train?\n Colt45\Pumpshotgun", "Choose","Cancel");
        }
        return 1;
    }
pawn Код:
if(strcmp(cmd, "/weapontraining", true) == 0)
    {
        if(IsPlayerInRangeOfPoint(playerid,5,300.5705,-134.0464,1004.0625)) // ending brace was missing
        {
            ShowPlayerDialog(playerid, 6666,DIALOG_STYLE_MSGBOX, "Which firearm would you like to train?\n Colt45\Pumpshotgun", "Choose","Cancel");
        }
        return 1;
    }



Re: Three errors - HighPitchedVoice - 01.05.2012

Still getting;
pawn Код:
C:\Documents and Settings\Lindvall\Skrivbord\Raven's Roleplay 0.3c V4.2\gamemodes\larp.pwn(59293) : error 027: invalid character constant
C:\Documents and Settings\Lindvall\Skrivbord\Raven'
s Roleplay 0.3c V4.2\gamemodes\larp.pwn(59293) : error 027: invalid character constant
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.



Re: Three errors - Mark™ - 01.05.2012

Quote:
Originally Posted by HighPitchedVoice
Посмотреть сообщение
Still getting;
pawn Код:
C:\Documents and Settings\Lindvall\Skrivbord\Raven's Roleplay 0.3c V4.2\gamemodes\larp.pwn(59293) : error 027: invalid character constant
C:\Documents and Settings\Lindvall\Skrivbord\Raven'
s Roleplay 0.3c V4.2\gamemodes\larp.pwn(59293) : error 027: invalid character constant
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Errors.
Post line 59293 here.


Re: Three errors - HighPitchedVoice - 01.05.2012

pawn Код:
ShowPlayerDialog(playerid, 6666,DIALOG_STYLE_MSGBOX, "Which firearm would you like to train?\n Colt45\Pumpshotgun", "Choose","Cancel");



AW: Three errors - calin1996 - 01.05.2012

Use
pawn Код:
if(PlayerToPoint
is easy


Re: Three errors - Mark™ - 01.05.2012

Quote:
Originally Posted by HighPitchedVoice
Посмотреть сообщение
pawn Код:
ShowPlayerDialog(playerid, 6666,DIALOG_STYLE_MSGBOX, "Which firearm would you like to train?\n Colt45\Pumpshotgun", "Choose","Cancel");
pawn Код:
ShowPlayerDialog(playerid, 6666,DIALOG_STYLE_MSGBOX, "Which firearm would you like to train?\n Colt45\n Pumpshotgun", "Choose","Cancel");



Re: Three errors - HighPitchedVoice - 01.05.2012

Oh, thank you.


Re: Three errors - Mark™ - 01.05.2012

Quote:
Originally Posted by HighPitchedVoice
Посмотреть сообщение
Oh, thank you.
Did you try that code ? Yes it is different, you were separating the line without \n.