SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 18/05/2020, 07:58 PM   #1
TheOliver
Big Clucker
 
Join Date: Apr 2020
Posts: 94
Reputation: 0
Default error 001: expected token: ",", but found "]"

Hello, I have been reviewing the code and I cannot find the error.

these are the errors that I get:
Quote:
C:\Users\Locucion\Desktop\servidores de samp\competitive_dm\gamemodes\DMC.pwn(245) : error 001: expected token: ",", but found "]"
C:\Users\Locucion\Desktop\servidores de samp\competitive_dm\gamemodes\DMC.pwn(245) : error 029: invalid expression, assumed zero
C:\Users\Locucion\Desktop\servidores de samp\competitive_dm\gamemodes\DMC.pwn(245) : error 029: invalid expression, assumed zero
C:\Users\Locucion\Desktop\servidores de samp\competitive_dm\gamemodes\DMC.pwn(245) : 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.
Quote:
public OnPlayerConnect(playerid)
{
Stats[playerid][0] = TextDrawCreate(10.000000, 129.644470, "box");
TextDrawLetterSize(Stats[playerid][0], 0.000000, 22.649972);
TextDrawTextSize(Stats[playerid][0], 199.000000, 0.000000);
TextDrawAlignment(Stats[playerid][0], 1);
TextDrawColor(Stats[playerid][0], 255);
TextDrawUseBox(Stats[playerid][0], 1);
TextDrawBoxColor(Stats[playerid][0]], -2139062017);
TextDrawSetShadow(Stats[playerid][0], 0);
TextDrawSetOutline(Stats[playerid][0], 0);
TextDrawBackgroundColor(Stats[playerid][0], -2139062017);
TextDrawFont(Stats[playerid][0], 1);
TextDrawSetProportional(Stats[playerid][0], 1);
TextDrawSetShadow(Stats[playerid][0], 0);

Stats[playerid][1] = TextDrawCreate(14.000000, 133.844421, "");
TextDrawLetterSize(Stats[playerid][1], 0.000000, 0.000000);
TextDrawTextSize(Stats[playerid][1], 90.000000, 90.000000);
TextDrawAlignment(Stats[playerid][1], 1);
TextDrawColor(Stats[playerid][1], -1);
TextDrawSetShadow(Stats[playerid][1], 0);
TextDrawSetOutline(Stats[playerid][1], 0);
TextDrawBackgroundColor(Stats[playerid][1], 255);
TextDrawFont(Stats[playerid][1], 5);
TextDrawSetProportional(Stats[playerid][1], 0);
TextDrawSetShadow(Stats[playerid][1], 0);
TextDrawSetPreviewModel(Stats[playerid][1], 250);
TextDrawSetPreviewRot(Stats[playerid][1], 0.000000, 0.000000, 0.000000, 1.000000);

Stats[playerid][2] = TextDrawCreate(125.300018, 134.111206, "Nombre");
TextDrawLetterSize(Stats[playerid][2], 0.400000, 1.600000);
TextDrawAlignment(Stats[playerid][2], 1);
TextDrawColor(Stats[playerid][2], -16776961);
TextDrawSetShadow(Stats[playerid][2], 0);
TextDrawSetOutline(Stats[playerid][2], 3);
TextDrawBackgroundColor(Stats[playerid][2], 255);
TextDrawFont(Stats[playerid][2], 3);
TextDrawSetProportional(Stats[playerid][2], 1);
TextDrawSetShadow(Stats[playerid][2], 0);

Stats[playerid][3] = TextDrawCreate(-268.299865, 596.487365, "box");
TextDrawLetterSize(Stats[playerid][3], 0.000000, 10.000000);
TextDrawTextSize(Stats[playerid][3], -174.000000, 0.000000);
TextDrawAlignment(Stats[playerid][3], 1);
TextDrawColor(Stats[playerid][3], -1);
TextDrawUseBox(Stats[playerid][3], 1);
TextDrawBoxColor(Stats[playerid][3], 255);
TextDrawSetShadow(Stats[playerid][3], 0);
TextDrawSetOutline(Stats[playerid][3], 0);
TextDrawBackgroundColor(Stats[playerid][3], 255);
TextDrawFont(Stats[playerid][3], 1);
TextDrawSetProportional(Stats[playerid][3], 1);
TextDrawSetShadow(Stats[playerid][3], 0);

Stats[playerid][4] = TextDrawCreate(13.500000, 228.577819, "Kills:999999");
TextDrawLetterSize(Stats[playerid][4], 0.398500, 1.612444);
TextDrawAlignment(Stats[playerid][4], 1);
TextDrawColor(Stats[playerid][4], -1);
TextDrawSetShadow(Stats[playerid][4], 0);
TextDrawSetOutline(Stats[playerid][4], 3);
TextDrawBackgroundColor(Stats[playerid][4], 255);
TextDrawFont(Stats[playerid][4], 3);
TextDrawSetProportional(Stats[playerid][4], 1);
TextDrawSetShadow(Stats[playerid][4], 0);

Stats[playerid][5] = TextDrawCreate(13.500000, 246.622283, "Muertes:999999");
TextDrawLetterSize(Stats[playerid][5], 0.398000, 1.612444);
TextDrawAlignment(Stats[playerid][5], 1);
TextDrawColor(Stats[playerid][5], -1);
TextDrawSetShadow(Stats[playerid][5], 0);
TextDrawSetOutline(Stats[playerid][5], 3);
TextDrawBackgroundColor(Stats[playerid][5], 255);
TextDrawFont(Stats[playerid][5], 3);
TextDrawSetProportional(Stats[playerid][5], 1);
TextDrawSetShadow(Stats[playerid][5], 0);

Stats[playerid][6] = TextDrawCreate(13.500000, 265.911193, "KD:999999");
TextDrawLetterSize(Stats[playerid][6], 0.398000, 1.612444);
TextDrawAlignment(Stats[playerid][6], 1);
TextDrawColor(Stats[playerid][6], -1);
TextDrawSetShadow(Stats[playerid][6], 0);
TextDrawSetOutline(Stats[playerid][6], 3);
TextDrawBackgroundColor(Stats[playerid][6], 255);
TextDrawFont(Stats[playerid][6], 3);
TextDrawSetProportional(Stats[playerid][6], 1);
TextDrawSetShadow(Stats[playerid][6], 0);

Stats[playerid][7] = TextDrawCreate(13.000000, 283.955657, "Nivel:999999");
TextDrawLetterSize(Stats[playerid][7], 0.398000, 1.612444);
TextDrawAlignment(Stats[playerid][7], 1);
TextDrawColor(Stats[playerid][7], -1);
TextDrawSetShadow(Stats[playerid][7], 0);
TextDrawSetOutline(Stats[playerid][7], 3);
TextDrawBackgroundColor(Stats[playerid][7], 255);
TextDrawFont(Stats[playerid][7], 3);
TextDrawSetProportional(Stats[playerid][7], 1);
TextDrawSetShadow(Stats[playerid][7], 0);

Stats[playerid][8] = TextDrawCreate(104.000000, 310.711181, "Quitar");
TextDrawLetterSize(Stats[playerid][8], 0.400000, 1.600000);
TextDrawTextSize(Stats[playerid][8], 0.000000, 61.000000);
TextDrawAlignment(Stats[playerid][8], 2);
TextDrawColor(Stats[playerid][8], -1);
TextDrawUseBox(Stats[playerid][8], 1);
TextDrawBoxColor(Stats[playerid][8], 255);
TextDrawSetShadow(Stats[playerid][8], 0);
TextDrawSetOutline(Stats[playerid][8], 2);
TextDrawBackgroundColor(Stats[playerid][8], 255);
TextDrawFont(Stats[playerid][8], 3);
TextDrawSetProportional(Stats[playerid][8], 1);
TextDrawSetShadow(Stats[playerid][8], 0);
TextDrawSetSelectable(Stats[playerid][8], true);
return 1;
}
TheOliver is offline   Reply With Quote
Old 18/05/2020, 08:03 PM   #2
Adamoneoone
Huge Clucker
 
Join Date: Sep 2014
Posts: 485
Reputation: 37
Default Re: error 001: expected token: ",", but found "]"

Mind showing which line is the error line?
__________________
If you want to have your own custom script, or even want to have one of our already released scripts, join our SCRIPTING SERVICES DISCORD, or send me a private message!
Adamoneoone is offline   Reply With Quote
Old 18/05/2020, 08:05 PM   #3
Ertouq
Huge Clucker
 
Ertouq's Avatar
 
Join Date: Jul 2014
Posts: 236
Reputation: 4
Default Re: error 001: expected token: ",", but found "]"

PHP Code:
public OnPlayerConnect(playerid)
{
Stats[playerid][0] = TextDrawCreate(10.000000129.644470"box");
TextDrawLetterSize(Stats[playerid][0], 0.00000022.649972);
TextDrawTextSize(Stats[playerid][0], 199.0000000.000000);
TextDrawAlignment(Stats[playerid][0], 1);
TextDrawColor(Stats[playerid][0], 255);
TextDrawUseBox(Stats[playerid][0], 1);
TextDrawBoxColor(Stats[playerid][0], -2139062017);
TextDrawSetShadow(Stats[playerid][0], 0);
TextDrawSetOutline(Stats[playerid][0], 0);
TextDrawBackgroundColor(Stats[playerid][0], -2139062017);
TextDrawFont(Stats[playerid][0], 1);
TextDrawSetProportional(Stats[playerid][0], 1);
TextDrawSetShadow(Stats[playerid][0], 0);

Stats[playerid][1] = TextDrawCreate(14.000000133.844421"");
TextDrawLetterSize(Stats[playerid][1], 0.0000000.000000);
TextDrawTextSize(Stats[playerid][1], 90.00000090.000000);
TextDrawAlignment(Stats[playerid][1], 1);
TextDrawColor(Stats[playerid][1], -1);
TextDrawSetShadow(Stats[playerid][1], 0);
TextDrawSetOutline(Stats[playerid][1], 0);
TextDrawBackgroundColor(Stats[playerid][1], 255);
TextDrawFont(Stats[playerid][1], 5);
TextDrawSetProportional(Stats[playerid][1], 0);
TextDrawSetShadow(Stats[playerid][1], 0);
TextDrawSetPreviewModel(Stats[playerid][1], 250);
TextDrawSetPreviewRot(Stats[playerid][1], 0.0000000.0000000.0000001.000000);

Stats[playerid][2] = TextDrawCreate(125.300018134.111206"Nombre");
TextDrawLetterSize(Stats[playerid][2], 0.4000001.600000);
TextDrawAlignment(Stats[playerid][2], 1);
TextDrawColor(Stats[playerid][2], -16776961);
TextDrawSetShadow(Stats[playerid][2], 0);
TextDrawSetOutline(Stats[playerid][2], 3);
TextDrawBackgroundColor(Stats[playerid][2], 255);
TextDrawFont(Stats[playerid][2], 3);
TextDrawSetProportional(Stats[playerid][2], 1);
TextDrawSetShadow(Stats[playerid][2], 0);

Stats[playerid][3] = TextDrawCreate(-268.299865596.487365"box");
TextDrawLetterSize(Stats[playerid][3], 0.00000010.000000);
TextDrawTextSize(Stats[playerid][3], -174.0000000.000000);
TextDrawAlignment(Stats[playerid][3], 1);
TextDrawColor(Stats[playerid][3], -1);
TextDrawUseBox(Stats[playerid][3], 1);
TextDrawBoxColor(Stats[playerid][3], 255);
TextDrawSetShadow(Stats[playerid][3], 0);
TextDrawSetOutline(Stats[playerid][3], 0);
TextDrawBackgroundColor(Stats[playerid][3], 255);
TextDrawFont(Stats[playerid][3], 1);
TextDrawSetProportional(Stats[playerid][3], 1);
TextDrawSetShadow(Stats[playerid][3], 0);

Stats[playerid][4] = TextDrawCreate(13.500000228.577819"Kills:999999");
TextDrawLetterSize(Stats[playerid][4], 0.3985001.612444);
TextDrawAlignment(Stats[playerid][4], 1);
TextDrawColor(Stats[playerid][4], -1);
TextDrawSetShadow(Stats[playerid][4], 0);
TextDrawSetOutline(Stats[playerid][4], 3);
TextDrawBackgroundColor(Stats[playerid][4], 255);
TextDrawFont(Stats[playerid][4], 3);
TextDrawSetProportional(Stats[playerid][4], 1);
TextDrawSetShadow(Stats[playerid][4], 0);

Stats[playerid][5] = TextDrawCreate(13.500000246.622283"Muertes:999999");
TextDrawLetterSize(Stats[playerid][5], 0.3980001.612444);
TextDrawAlignment(Stats[playerid][5], 1);
TextDrawColor(Stats[playerid][5], -1);
TextDrawSetShadow(Stats[playerid][5], 0);
TextDrawSetOutline(Stats[playerid][5], 3);
TextDrawBackgroundColor(Stats[playerid][5], 255);
TextDrawFont(Stats[playerid][5], 3);
TextDrawSetProportional(Stats[playerid][5], 1);
TextDrawSetShadow(Stats[playerid][5], 0);

Stats[playerid][6] = TextDrawCreate(13.500000265.911193"KD:999999");
TextDrawLetterSize(Stats[playerid][6], 0.3980001.612444);
TextDrawAlignment(Stats[playerid][6], 1);
TextDrawColor(Stats[playerid][6], -1);
TextDrawSetShadow(Stats[playerid][6], 0);
TextDrawSetOutline(Stats[playerid][6], 3);
TextDrawBackgroundColor(Stats[playerid][6], 255);
TextDrawFont(Stats[playerid][6], 3);
TextDrawSetProportional(Stats[playerid][6], 1);
TextDrawSetShadow(Stats[playerid][6], 0);

Stats[playerid][7] = TextDrawCreate(13.000000283.955657"Nivel:999999");
TextDrawLetterSize(Stats[playerid][7], 0.3980001.612444);
TextDrawAlignment(Stats[playerid][7], 1);
TextDrawColor(Stats[playerid][7], -1);
TextDrawSetShadow(Stats[playerid][7], 0);
TextDrawSetOutline(Stats[playerid][7], 3);
TextDrawBackgroundColor(Stats[playerid][7], 255);
TextDrawFont(Stats[playerid][7], 3);
TextDrawSetProportional(Stats[playerid][7], 1);
TextDrawSetShadow(Stats[playerid][7], 0);

Stats[playerid][8] = TextDrawCreate(104.000000310.711181"Quitar");
TextDrawLetterSize(Stats[playerid][8], 0.4000001.600000);
TextDrawTextSize(Stats[playerid][8], 0.00000061.000000);
TextDrawAlignment(Stats[playerid][8], 2);
TextDrawColor(Stats[playerid][8], -1);
TextDrawUseBox(Stats[playerid][8], 1);
TextDrawBoxColor(Stats[playerid][8], 255);
TextDrawSetShadow(Stats[playerid][8], 0);
TextDrawSetOutline(Stats[playerid][8], 2);
TextDrawBackgroundColor(Stats[playerid][8], 255);
TextDrawFont(Stats[playerid][8], 3);
TextDrawSetProportional(Stats[playerid][8], 1);
TextDrawSetShadow(Stats[playerid][8], 0);
TextDrawSetSelectable(Stats[playerid][8], true);
return 
1;

You had a ] more

Code:
TextDrawBoxColor(Stats[playerid][0]], -2139062017);
Ertouq is offline   Reply With Quote
Old 18/05/2020, 10:28 PM   #4
TheOliver
Big Clucker
 
Join Date: Apr 2020
Posts: 94
Reputation: 0
Default Re: error 001: expected token: ",", but found "]"

Quote:
Originally Posted by Ertouq View Post
PHP Code:
public OnPlayerConnect(playerid)
{
Stats[playerid][0] = TextDrawCreate(10.000000129.644470"box");
TextDrawLetterSize(Stats[playerid][0], 0.00000022.649972);
TextDrawTextSize(Stats[playerid][0], 199.0000000.000000);
TextDrawAlignment(Stats[playerid][0], 1);
TextDrawColor(Stats[playerid][0], 255);
TextDrawUseBox(Stats[playerid][0], 1);
TextDrawBoxColor(Stats[playerid][0], -2139062017);
TextDrawSetShadow(Stats[playerid][0], 0);
TextDrawSetOutline(Stats[playerid][0], 0);
TextDrawBackgroundColor(Stats[playerid][0], -2139062017);
TextDrawFont(Stats[playerid][0], 1);
TextDrawSetProportional(Stats[playerid][0], 1);
TextDrawSetShadow(Stats[playerid][0], 0);

Stats[playerid][1] = TextDrawCreate(14.000000133.844421"");
TextDrawLetterSize(Stats[playerid][1], 0.0000000.000000);
TextDrawTextSize(Stats[playerid][1], 90.00000090.000000);
TextDrawAlignment(Stats[playerid][1], 1);
TextDrawColor(Stats[playerid][1], -1);
TextDrawSetShadow(Stats[playerid][1], 0);
TextDrawSetOutline(Stats[playerid][1], 0);
TextDrawBackgroundColor(Stats[playerid][1], 255);
TextDrawFont(Stats[playerid][1], 5);
TextDrawSetProportional(Stats[playerid][1], 0);
TextDrawSetShadow(Stats[playerid][1], 0);
TextDrawSetPreviewModel(Stats[playerid][1], 250);
TextDrawSetPreviewRot(Stats[playerid][1], 0.0000000.0000000.0000001.000000);

Stats[playerid][2] = TextDrawCreate(125.300018134.111206"Nombre");
TextDrawLetterSize(Stats[playerid][2], 0.4000001.600000);
TextDrawAlignment(Stats[playerid][2], 1);
TextDrawColor(Stats[playerid][2], -16776961);
TextDrawSetShadow(Stats[playerid][2], 0);
TextDrawSetOutline(Stats[playerid][2], 3);
TextDrawBackgroundColor(Stats[playerid][2], 255);
TextDrawFont(Stats[playerid][2], 3);
TextDrawSetProportional(Stats[playerid][2], 1);
TextDrawSetShadow(Stats[playerid][2], 0);

Stats[playerid][3] = TextDrawCreate(-268.299865596.487365"box");
TextDrawLetterSize(Stats[playerid][3], 0.00000010.000000);
TextDrawTextSize(Stats[playerid][3], -174.0000000.000000);
TextDrawAlignment(Stats[playerid][3], 1);
TextDrawColor(Stats[playerid][3], -1);
TextDrawUseBox(Stats[playerid][3], 1);
TextDrawBoxColor(Stats[playerid][3], 255);
TextDrawSetShadow(Stats[playerid][3], 0);
TextDrawSetOutline(Stats[playerid][3], 0);
TextDrawBackgroundColor(Stats[playerid][3], 255);
TextDrawFont(Stats[playerid][3], 1);
TextDrawSetProportional(Stats[playerid][3], 1);
TextDrawSetShadow(Stats[playerid][3], 0);

Stats[playerid][4] = TextDrawCreate(13.500000228.577819"Kills:999999");
TextDrawLetterSize(Stats[playerid][4], 0.3985001.612444);
TextDrawAlignment(Stats[playerid][4], 1);
TextDrawColor(Stats[playerid][4], -1);
TextDrawSetShadow(Stats[playerid][4], 0);
TextDrawSetOutline(Stats[playerid][4], 3);
TextDrawBackgroundColor(Stats[playerid][4], 255);
TextDrawFont(Stats[playerid][4], 3);
TextDrawSetProportional(Stats[playerid][4], 1);
TextDrawSetShadow(Stats[playerid][4], 0);

Stats[playerid][5] = TextDrawCreate(13.500000246.622283"Muertes:999999");
TextDrawLetterSize(Stats[playerid][5], 0.3980001.612444);
TextDrawAlignment(Stats[playerid][5], 1);
TextDrawColor(Stats[playerid][5], -1);
TextDrawSetShadow(Stats[playerid][5], 0);
TextDrawSetOutline(Stats[playerid][5], 3);
TextDrawBackgroundColor(Stats[playerid][5], 255);
TextDrawFont(Stats[playerid][5], 3);
TextDrawSetProportional(Stats[playerid][5], 1);
TextDrawSetShadow(Stats[playerid][5], 0);

Stats[playerid][6] = TextDrawCreate(13.500000265.911193"KD:999999");
TextDrawLetterSize(Stats[playerid][6], 0.3980001.612444);
TextDrawAlignment(Stats[playerid][6], 1);
TextDrawColor(Stats[playerid][6], -1);
TextDrawSetShadow(Stats[playerid][6], 0);
TextDrawSetOutline(Stats[playerid][6], 3);
TextDrawBackgroundColor(Stats[playerid][6], 255);
TextDrawFont(Stats[playerid][6], 3);
TextDrawSetProportional(Stats[playerid][6], 1);
TextDrawSetShadow(Stats[playerid][6], 0);

Stats[playerid][7] = TextDrawCreate(13.000000283.955657"Nivel:999999");
TextDrawLetterSize(Stats[playerid][7], 0.3980001.612444);
TextDrawAlignment(Stats[playerid][7], 1);
TextDrawColor(Stats[playerid][7], -1);
TextDrawSetShadow(Stats[playerid][7], 0);
TextDrawSetOutline(Stats[playerid][7], 3);
TextDrawBackgroundColor(Stats[playerid][7], 255);
TextDrawFont(Stats[playerid][7], 3);
TextDrawSetProportional(Stats[playerid][7], 1);
TextDrawSetShadow(Stats[playerid][7], 0);

Stats[playerid][8] = TextDrawCreate(104.000000310.711181"Quitar");
TextDrawLetterSize(Stats[playerid][8], 0.4000001.600000);
TextDrawTextSize(Stats[playerid][8], 0.00000061.000000);
TextDrawAlignment(Stats[playerid][8], 2);
TextDrawColor(Stats[playerid][8], -1);
TextDrawUseBox(Stats[playerid][8], 1);
TextDrawBoxColor(Stats[playerid][8], 255);
TextDrawSetShadow(Stats[playerid][8], 0);
TextDrawSetOutline(Stats[playerid][8], 2);
TextDrawBackgroundColor(Stats[playerid][8], 255);
TextDrawFont(Stats[playerid][8], 3);
TextDrawSetProportional(Stats[playerid][8], 1);
TextDrawSetShadow(Stats[playerid][8], 0);
TextDrawSetSelectable(Stats[playerid][8], true);
return 
1;

You had a ] more

Code:
TextDrawBoxColor(Stats[playerid][0]], -2139062017);
thanks, I hadn't realized that xd
TheOliver 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
error 001: expected token: "-string end-", but found "-identifier-". When compiling a scipt with register/login Gorgeousmaniac Scripting Help 3 22/08/2016 10:11 AM
Scripting error - "Expected token "," but found "}" JeffDiamond Scripting Help 4 29/10/2014 05:59 PM
error: undefine symbol "j" and expected token ";" but found "]" JEkvall95 Scripting Help 9 27/07/2013 10:09 AM
C:\Users\Andy\Documents\Connor\NRP - New\gamemodes\NRP.pwn(2126) : error 001: expected token: ")", but found "{" NewerthRoleplay Scripting Help 2 14/03/2012 08:47 PM
D:\Mis documentos\Server\gamemodes\lscnr.pwn(30602) : error 001: expected token: ",", but found ";" [M]xFire Help Archive 3 27/08/2010 07:11 PM


All times are GMT. The time now is 02:24 PM.


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