Three errors
#1

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;
    }
Reply
#2

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))
Reply
#3

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;
    }
Reply
#4

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.
Reply
#5

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.
Reply
#6

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

Use
pawn Код:
if(PlayerToPoint
is easy
Reply
#8

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");
Reply
#9

Oh, thank you.
Reply
#10

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


Forum Jump:


Users browsing this thread: 4 Guest(s)