PDA

View Full Version : Help me, please laser system


Scylles
25/06/2015, 03:03 PM
I'am tryin make a laser system but I have some errors. Please Help me and I am sorry for my bad english.


C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25217) : error 010: invalid function or declaration
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25226) : warning 209: function "cmd_lazerkapat" should return a value
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25227) : error 010: invalid function or declaration
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25245) : warning 209: function "cmd_lazerrenk" should return a value
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25246) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

3 Errors.



CMD:lazerac(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
SetPVarInt(playerid, "laser", 1);
SetPVarInt(playerid, "color", GetPVarInt(playerid, "color"));
}
else SendClientMessage(playerid, COLOR_GREY, "VIP değilsin.");
return 1;//////Line 25217
}

CMD:lazerkapat(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
SetPVarInt(playerid, "laser", 0);
RemovePlayerAttachedObject(playerid, 0);
}
else return SendClientMessage(playerid, COLOR_GREY, "VIP değilsin.");//////Line 25226
return 1;//////Line 25227
}

CMD:lazerrenk(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
new color[16];
if(sscanf(params, "s[15]", color)) return SendClientMessage(playerid, C_GREY, "Kullanım: /lazerrenk [renk]");
SendClientMessage(playerid, C_GREY, "Kirmizi, Mavi, Pembe, Turuncu, Yeşil, Sari");

if(!strcmp(color, "kirmizi", true)) SetPVarInt(playerid, "color", 18643);
else if(!strcmp(color, "mavi", true)) SetPVarInt(playerid, "color", 19080);
else if(!strcmp(color, "pembe", true)) SetPVarInt(playerid, "color", 19081);
else if(!strcmp(color, "turuncu", true)) SetPVarInt(playerid, "color", 19082);
else if(!strcmp(color, "yeşil", true)) SetPVarInt(playerid, "color", 19083);
else if(!strcmp(color, "sari", true)) SetPVarInt(playerid, "color", 19084);
else SendClientMessage(playerid, C_VIOLET, "Geçerli Bir Renk Seçmediniz!");
}
else return SendClientMessage(playerid, COLOR_GREY, "VIP değilsin.");//////Line 25245
return 1;//////Line 25246
}

Scylles
25/06/2015, 07:43 PM
Somebody Can Help Me?

kyriakos587
25/06/2015, 08:13 PM
Show us the line which you got error

Scylles
25/06/2015, 09:44 PM
Show us the line which you got error

I already show.if you look more carefully I was write. For examble I was wrote

else return SendClientMessage(playerid, COLOR_GREY, "VIP değilsin.");//////Line 25226
return 1;//////Line 25227

Scylles
26/06/2015, 11:31 AM
+++++

X337
26/06/2015, 11:38 AM
Try to change COLOR_GREY to 0xd3d3d3ff.
Example :

SendClientMessage(playerid, COLOR_GREY, "VIP değilsin.");

Change to :

SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");

Scylles
26/06/2015, 11:46 AM
Try to change COLOR_GREY to 0xd3d3d3ff.
Example :

SendClientMessage(playerid, COLOR_GREY, "VIP değilsin.");

Change to :

SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");




Now I Have This Errors

C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25216) : warning 209: function "cmd_lazerac" should return a value
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25217) : error 010: invalid function or declaration
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25226) : warning 209: function "cmd_lazerkapat" should return a value
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25227) : error 010: invalid function or declaration
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25245) : warning 209: function "cmd_lazerrenk" should return a value
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25246) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.


CMD:lazerac(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
SetPVarInt(playerid, "laser", 1);
SetPVarInt(playerid, "color", GetPVarInt(playerid, "color"));
}
else return SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");/////Line25216
return 1;/////Line25217
}

CMD:lazerkapat(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
SetPVarInt(playerid, "laser", 0);
RemovePlayerAttachedObject(playerid, 0);
}
else return SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");/////Line25226
return 1;/////Line25227
}

CMD:lazerrenk(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
new color[16];
if(sscanf(params, "s[15]", color)) return SendClientMessage(playerid, C_GREY, "Kullanım: /lazerrenk [renk]");
SendClientMessage(playerid, C_GREY, "Kirmizi, Mavi, Pembe, Turuncu, Yeşil, Sari");

if(!strcmp(color, "kirmizi", true)) SetPVarInt(playerid, "color", 18643);
else if(!strcmp(color, "mavi", true)) SetPVarInt(playerid, "color", 19080);
else if(!strcmp(color, "pembe", true)) SetPVarInt(playerid, "color", 19081);
else if(!strcmp(color, "turuncu", true)) SetPVarInt(playerid, "color", 19082);
else if(!strcmp(color, "yeşil", true)) SetPVarInt(playerid, "color", 19083);
else if(!strcmp(color, "sari", true)) SetPVarInt(playerid, "color", 19084);
else SendClientMessage(playerid, C_VIOLET, "Geçerli Bir Renk Seçmediniz!");
}
else return SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");/////Line25245
return 1;/////Line25246
}

Prokill911
26/06/2015, 11:47 AM
#define COLOR_GREY 0xd3d3d3ff
#define COLOR_GREY 0xd3d3d3ff
CMD:lazerac(playerid, params[]) {
if(PlayerInfo[playerid][pDonator]>0) {
SetPVarInt(playerid, "laser", 1);
SetPVarInt(playerid, "color", GetPVarInt(playerid, "color"));
} else {
SendClientMessage(playerid, COLOR_GREY, "VIP değilsin.");
}
return 1;//////Line 25217
}

CMD:lazerkapat(playerid, params[]) {
if(PlayerInfo[playerid][pDonator]>0) {
SetPVarInt(playerid, "laser", 0);
RemovePlayerAttachedObject(playerid, 0);
} else {
SendClientMessage(playerid, COLOR_GREY, "VIP değilsin.");//////Line 25226
}
return 1;//////Line 25227
}

CMD:lazerrenk(playerid, params[]) {
if(PlayerInfo[playerid][pDonator]>0) {
new color[16];
if(sscanf(params, "s[15]", color)) {
SendClientMessage(playerid, C_GREY, "Kullanım: /lazerrenk [renk]");
return 1;
}
SendClientMessage(playerid, C_GREY, "Kirmizi, Mavi, Pembe, Turuncu, Yeşil, Sari");
if(!strcmp(color, "kirmizi", true)) {
SetPVarInt(playerid, "color", 18643);
} else if(!strcmp(color, "mavi", true)) {
SetPVarInt(playerid, "color", 19080);
} else if(!strcmp(color, "pembe", true)) {
SetPVarInt(playerid, "color", 19081);
} else if(!strcmp(color, "turuncu", true)) {
SetPVarInt(playerid, "color", 19082);
} else if(!strcmp(color, "yeşil", true)) {
SetPVarInt(playerid, "color", 19083);
} else if(!strcmp(color, "sari", true)) {
SetPVarInt(playerid, "color", 19084);
} else {
SendClientMessage(playerid, C_VIOLET, "Geçerli Bir Renk Seçmediniz!");
}
} else {
SendClientMessage(playerid, COLOR_GREY, "VIP değilsin.");//////Line 25245
}
return 1;//////Line 25246
}



The above could should compile just fine


1, you weren't opening the command block.. You were just closing it..
Makes your code basically error every time...

Every time you make a command you must OPEN the command block and CLOSE it...

CMD:CommandName(playerid, params[], help) { //// <---- Opened
if(help) { // <---- OPENED
SendClientMessage(playerid, -1, "Blah blah Blah");
return 1;
} // <-- CLOSED the IF statement.
} // CLOSED the command statement.

LazyB0y
26/06/2015, 11:49 AM
try this
CMD:lazerac(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
SetPVarInt(playerid, "laser", 1);
SetPVarInt(playerid, "color", GetPVarInt(playerid, "color"));
}
else return SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");
}

CMD:lazerkapat(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
SetPVarInt(playerid, "laser", 0);
RemovePlayerAttachedObject(playerid, 0);
}
else return SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");
}

CMD:lazerrenk(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
new color[16];
if(sscanf(params, "s[15]", color)) return SendClientMessage(playerid, C_GREY, "Kullanım: /lazerrenk [renk]");
SendClientMessage(playerid, C_GREY, "Kirmizi, Mavi, Pembe, Turuncu, Yeşil, Sari");

if(!strcmp(color, "kirmizi", true)) SetPVarInt(playerid, "color", 18643);
else if(!strcmp(color, "mavi", true)) SetPVarInt(playerid, "color", 19080);
else if(!strcmp(color, "pembe", true)) SetPVarInt(playerid, "color", 19081);
else if(!strcmp(color, "turuncu", true)) SetPVarInt(playerid, "color", 19082);
else if(!strcmp(color, "yeşil", true)) SetPVarInt(playerid, "color", 19083);
else if(!strcmp(color, "sari", true)) SetPVarInt(playerid, "color", 19084);
else SendClientMessage(playerid, C_VIOLET, "Geçerli Bir Renk Seçmediniz!");
}
else return SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");
}

Scylles
26/06/2015, 11:50 AM
#define COLOR_GREY 0xAFAFAFAA

Already defined

X337
26/06/2015, 11:50 AM
ROFL, you need to return a value

CMD:lazerac(playerid, params[]) {
if(PlayerInfo[playerid][pDonator]>0)
{
SetPVarInt(playerid, "laser", 1);
SetPVarInt(playerid, "color", GetPVarInt(playerid, "color"));
}
else
{
SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");/////Line25216
}
return 1;/////Line25217
}

CMD:lazerkapat(playerid, params[]) {
if(PlayerInfo[playerid][pDonator]>0)
{
SetPVarInt(playerid, "laser", 0);
RemovePlayerAttachedObject(playerid, 0);
}
else
{
SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");/////Line25226
}
return 1;/////Line25227
}

CMD:lazerrenk(playerid, params[]) {
if(PlayerInfo[playerid][pDonator]>0)
{
new color[16];
if(sscanf(params, "s[15]", color)) return SendClientMessage(playerid, C_GREY, "Kullanım: /lazerrenk [renk]");
SendClientMessage(playerid, C_GREY, "Kirmizi, Mavi, Pembe, Turuncu, Yeşil, Sari");

if(!strcmp(color, "kirmizi", true)) SetPVarInt(playerid, "color", 18643);
else if(!strcmp(color, "mavi", true)) SetPVarInt(playerid, "color", 19080);
else if(!strcmp(color, "pembe", true)) SetPVarInt(playerid, "color", 19081);
else if(!strcmp(color, "turuncu", true)) SetPVarInt(playerid, "color", 19082);
else if(!strcmp(color, "yeşil", true)) SetPVarInt(playerid, "color", 19083);
else if(!strcmp(color, "sari", true)) SetPVarInt(playerid, "color", 19084);
else SendClientMessage(playerid, C_VIOLET, "Geçerli Bir Renk Seçmediniz!");
}
else
{
SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");/////Line25245
}
return 1;/////Line25246
}

Airman123
26/06/2015, 11:51 AM
CMD:lazerac(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
SetPVarInt(playerid, "laser", 1);
SetPVarInt(playerid, "color", GetPVarInt(playerid, "color"));
}
else SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");/////Line25216
return 1;/////Line25217
}

CMD:lazerkapat(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
SetPVarInt(playerid, "laser", 0);
RemovePlayerAttachedObject(playerid, 0);
}
else SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");/////Line25226
return 1;/////Line25227
}

CMD:lazerrenk(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
new color[16];
if(sscanf(params, "s[15]", color)) return SendClientMessage(playerid, C_GREY, "Kullanım: /lazerrenk [renk]");
SendClientMessage(playerid, C_GREY, "Kirmizi, Mavi, Pembe, Turuncu, Yeşil, Sari");

if(!strcmp(color, "kirmizi", true)) SetPVarInt(playerid, "color", 18643);
else if(!strcmp(color, "mavi", true)) SetPVarInt(playerid, "color", 19080);
else if(!strcmp(color, "pembe", true)) SetPVarInt(playerid, "color", 19081);
else if(!strcmp(color, "turuncu", true)) SetPVarInt(playerid, "color", 19082);
else if(!strcmp(color, "yeşil", true)) SetPVarInt(playerid, "color", 19083);
else if(!strcmp(color, "sari", true)) SetPVarInt(playerid, "color", 19084);
else SendClientMessage(playerid, C_VIOLET, "Geçerli Bir Renk Seçmediniz!");
}
else SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");/////Line25245
return 1;/////Line25246
}

this should work perfecT!!

Scylles
26/06/2015, 11:52 AM
try this
CMD:lazerac(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
SetPVarInt(playerid, "laser", 1);
SetPVarInt(playerid, "color", GetPVarInt(playerid, "color"));
}
else return SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");
}

CMD:lazerkapat(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
SetPVarInt(playerid, "laser", 0);
RemovePlayerAttachedObject(playerid, 0);
}
else return SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");
}

CMD:lazerrenk(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
new color[16];
if(sscanf(params, "s[15]", color)) return SendClientMessage(playerid, C_GREY, "Kullanım: /lazerrenk [renk]");
SendClientMessage(playerid, C_GREY, "Kirmizi, Mavi, Pembe, Turuncu, Yeşil, Sari");

if(!strcmp(color, "kirmizi", true)) SetPVarInt(playerid, "color", 18643);
else if(!strcmp(color, "mavi", true)) SetPVarInt(playerid, "color", 19080);
else if(!strcmp(color, "pembe", true)) SetPVarInt(playerid, "color", 19081);
else if(!strcmp(color, "turuncu", true)) SetPVarInt(playerid, "color", 19082);
else if(!strcmp(color, "yeşil", true)) SetPVarInt(playerid, "color", 19083);
else if(!strcmp(color, "sari", true)) SetPVarInt(playerid, "color", 19084);
else SendClientMessage(playerid, C_VIOLET, "Geçerli Bir Renk Seçmediniz!");
}
else return SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");
}



Now I have this errors

C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25216) : warning 209: function "cmd_lazerac" should return a value
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25217) : error 054: unmatched closing brace ("}")
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25225) : warning 209: function "cmd_lazerkapat" should return a value
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25226) : error 054: unmatched closing brace ("}")
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25243) : warning 209: function "cmd_lazerrenk" should return a value
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25244) : error 054: unmatched closing brace ("}")
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.

LazyB0y
26/06/2015, 11:53 AM
use what bondowocopz said

Prokill911
26/06/2015, 11:53 AM
#define COLOR_GREY2 0xd3d3d3ff
CMD:lazerac(playerid, params[]) {
if(PlayerInfo[playerid][pDonator]>0) {
SetPVarInt(playerid, "laser", 1);
SetPVarInt(playerid, "color", GetPVarInt(playerid, "color"));
} else {
SendClientMessage(playerid, COLOR_GREY2, "VIP değilsin.");
}
return 1;//////Line 25217
}

CMD:lazerkapat(playerid, params[]) {
if(PlayerInfo[playerid][pDonator]>0) {
SetPVarInt(playerid, "laser", 0);
RemovePlayerAttachedObject(playerid, 0);
} else {
SendClientMessage(playerid, COLOR_GREY2, "VIP değilsin.");//////Line 25226
}
return 1;//////Line 25227
}

CMD:lazerrenk(playerid, params[]) {
if(PlayerInfo[playerid][pDonator]>0) {
new color[16];
if(sscanf(params, "s[15]", color)) {
SendClientMessage(playerid, COLOR_GREY2, "Kullanım: /lazerrenk [renk]");
return 1;
}
SendClientMessage(playerid, C_GREY, "Kirmizi, Mavi, Pembe, Turuncu, Yeşil, Sari");
if(!strcmp(color, "kirmizi", true)) {
SetPVarInt(playerid, "color", 18643);
} else if(!strcmp(color, "mavi", true)) {
SetPVarInt(playerid, "color", 19080);
} else if(!strcmp(color, "pembe", true)) {
SetPVarInt(playerid, "color", 19081);
} else if(!strcmp(color, "turuncu", true)) {
SetPVarInt(playerid, "color", 19082);
} else if(!strcmp(color, "yeşil", true)) {
SetPVarInt(playerid, "color", 19083);
} else if(!strcmp(color, "sari", true)) {
SetPVarInt(playerid, "color", 19084);
} else {
SendClientMessage(playerid, C_VIOLET, "Geçerli Bir Renk Seçmediniz!");
}
} else {
SendClientMessage(playerid, COLOR_GREY2, "VIP değilsin.");//////Line 25245
}
return 1;//////Line 25246
}



The above code works...
I just compiled it.

Scylles
26/06/2015, 11:54 AM
CMD:lazerac(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
SetPVarInt(playerid, "laser", 1);
SetPVarInt(playerid, "color", GetPVarInt(playerid, "color"));
}
else SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");/////Line25216
return 1;/////Line25217
}

CMD:lazerkapat(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
SetPVarInt(playerid, "laser", 0);
RemovePlayerAttachedObject(playerid, 0);
}
else SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");/////Line25226
return 1;/////Line25227
}

CMD:lazerrenk(playerid, params[])
if(PlayerInfo[playerid][pDonator]>0)
{
new color[16];
if(sscanf(params, "s[15]", color)) return SendClientMessage(playerid, C_GREY, "Kullanım: /lazerrenk [renk]");
SendClientMessage(playerid, C_GREY, "Kirmizi, Mavi, Pembe, Turuncu, Yeşil, Sari");

if(!strcmp(color, "kirmizi", true)) SetPVarInt(playerid, "color", 18643);
else if(!strcmp(color, "mavi", true)) SetPVarInt(playerid, "color", 19080);
else if(!strcmp(color, "pembe", true)) SetPVarInt(playerid, "color", 19081);
else if(!strcmp(color, "turuncu", true)) SetPVarInt(playerid, "color", 19082);
else if(!strcmp(color, "yeşil", true)) SetPVarInt(playerid, "color", 19083);
else if(!strcmp(color, "sari", true)) SetPVarInt(playerid, "color", 19084);
else SendClientMessage(playerid, C_VIOLET, "Geçerli Bir Renk Seçmediniz!");
}
else SendClientMessage(playerid, 0xd3d3d3ff, "VIP değilsin.");/////Line25245
return 1;/////Line25246
}

this should work perfecT!!


Now This Errors

C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25217) : error 010: invalid function or declaration
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25227) : error 010: invalid function or declaration
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25245) : warning 209: function "cmd_lazerrenk" should return a value
C:\Users\Mertcan\Desktop\mod\v2.0 - Windows\gamemodes\tcgaming.pwn(25246) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.

Prokill911
26/06/2015, 11:55 AM
#define COLOR_GREY2 0xd3d3d3ff
CMD:lazerac(playerid, params[]) {
if(PlayerInfo[playerid][pDonator]>0) {
SetPVarInt(playerid, "laser", 1);
SetPVarInt(playerid, "color", GetPVarInt(playerid, "color"));
} else {
SendClientMessage(playerid, COLOR_GREY2, "VIP değilsin.");
}
return 1;//////Line 25217
}

CMD:lazerkapat(playerid, params[]) {
if(PlayerInfo[playerid][pDonator]>0) {
SetPVarInt(playerid, "laser", 0);
RemovePlayerAttachedObject(playerid, 0);
} else {
SendClientMessage(playerid, COLOR_GREY2, "VIP değilsin.");//////Line 25226
}
return 1;//////Line 25227
}

CMD:lazerrenk(playerid, params[]) {
if(PlayerInfo[playerid][pDonator]>0) {
new color[16];
if(sscanf(params, "s[15]", color)) {
SendClientMessage(playerid, COLOR_GREY2, "Kullanım: /lazerrenk [renk]");
return 1;
}
SendClientMessage(playerid, C_GREY, "Kirmizi, Mavi, Pembe, Turuncu, Yeşil, Sari");
if(!strcmp(color, "kirmizi", true)) {
SetPVarInt(playerid, "color", 18643);
} else if(!strcmp(color, "mavi", true)) {
SetPVarInt(playerid, "color", 19080);
} else if(!strcmp(color, "pembe", true)) {
SetPVarInt(playerid, "color", 19081);
} else if(!strcmp(color, "turuncu", true)) {
SetPVarInt(playerid, "color", 19082);
} else if(!strcmp(color, "yeşil", true)) {
SetPVarInt(playerid, "color", 19083);
} else if(!strcmp(color, "sari", true)) {
SetPVarInt(playerid, "color", 19084);
} else {
SendClientMessage(playerid, C_VIOLET, "Geçerli Bir Renk Seçmediniz!");
}
} else {
SendClientMessage(playerid, COLOR_GREY2, "VIP değilsin.");//////Line 25245
}
return 1;//////Line 25246
}



The above code works...
I just compiled it.

Again..
What I just said..



NONE Of the codes above mine will work for the SHEER fact...
THEY'RE NOT OPENING OR CLOSING... The command blocks...

Example..

This is what your command looks like...

CMD:name(playerid,params[],help)
blahblah


SHOULD BE

CMD:name(playerid, params[],help) {
/////// CODE GOES HERE....
return 1;
}

Scylles
26/06/2015, 11:56 AM
#define COLOR_GREY2 0xd3d3d3ff
CMD:lazerac(playerid, params[]) {
if(PlayerInfo[playerid][pDonator]>0) {
SetPVarInt(playerid, "laser", 1);
SetPVarInt(playerid, "color", GetPVarInt(playerid, "color"));
} else {
SendClientMessage(playerid, COLOR_GREY2, "VIP değilsin.");
}
return 1;//////Line 25217
}

CMD:lazerkapat(playerid, params[]) {
if(PlayerInfo[playerid][pDonator]>0) {
SetPVarInt(playerid, "laser", 0);
RemovePlayerAttachedObject(playerid, 0);
} else {
SendClientMessage(playerid, COLOR_GREY2, "VIP değilsin.");//////Line 25226
}
return 1;//////Line 25227
}

CMD:lazerrenk(playerid, params[]) {
if(PlayerInfo[playerid][pDonator]>0) {
new color[16];
if(sscanf(params, "s[15]", color)) {
SendClientMessage(playerid, COLOR_GREY2, "Kullanım: /lazerrenk [renk]");
return 1;
}
SendClientMessage(playerid, C_GREY, "Kirmizi, Mavi, Pembe, Turuncu, Yeşil, Sari");
if(!strcmp(color, "kirmizi", true)) {
SetPVarInt(playerid, "color", 18643);
} else if(!strcmp(color, "mavi", true)) {
SetPVarInt(playerid, "color", 19080);
} else if(!strcmp(color, "pembe", true)) {
SetPVarInt(playerid, "color", 19081);
} else if(!strcmp(color, "turuncu", true)) {
SetPVarInt(playerid, "color", 19082);
} else if(!strcmp(color, "yeşil", true)) {
SetPVarInt(playerid, "color", 19083);
} else if(!strcmp(color, "sari", true)) {
SetPVarInt(playerid, "color", 19084);
} else {
SendClientMessage(playerid, C_VIOLET, "Geçerli Bir Renk Seçmediniz!");
}
} else {
SendClientMessage(playerid, COLOR_GREY2, "VIP değilsin.");//////Line 25245
}
return 1;//////Line 25246
}



The above code works...
I just compiled it.

Thank You