Why this Errors? -
Andrew97 - 15.04.2012
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/welcome", cmdtext, true, 10) == 0)
SendClientMessageToAll(RED,"Welcome");
return 1;
}
{
if (strcmp("/refunds", cmdtext, true, 10) == 0);
GivePlayerMoney(playerid,2345000);
SetVehicleParamsForPlayer(490,playerid,"nothing",doorslocked);
return 1;
}
Errors

:
Код:
\Script\gamemodes\FR.pwn(131) : error 055: start of function body without function header
D:\Script\gamemodes\FR.pwn(132) : error 010: invalid function or declaration
D:\Script\gamemodes\FR.pwn(136) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Errors.
WHy this Errors?
Re: Why this Errors? -
sjvt - 15.04.2012
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/welcome", cmdtext, true) == 0)
{
SendClientMessageToAll(RED,"Welcome");
return 1;
}
if (strcmp("/refunds", cmdtext, true) == 0)
{
GivePlayerMoney(playerid,2345000);
SetVehicleParamsForPlayer(490,playerid,"nothing",doorslocked);
return 1;
}
return 1;
}
Re: Why this Errors? -
Andrew97 - 15.04.2012
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/welcome", cmdtext, true) == 0)
{
SendClientMessageToAll(RED,"Welcome");
return 1;
}
if (strcmp("/refunds", cmdtext, true) == 0);
{
GivePlayerMoney(playerid,2345000);
SetVehicleParamsForPlayer(490,playerid,12,0);
SetPlayerArmour(playerid,100);
return 1;
}
}
Errors

:\Script\gamemodes\FR.pwn(12

: error 036: empty statement
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Error.
how to fix it?
Re: Why this Errors? -
RollTi - 15.04.2012
pawn Код:
if (strcmp("/refunds", cmdtext, true) == 0);
to
pawn Код:
if (strcmp("/refunds", cmdtext, true) == 0)
Re: Why this Errors? -
Andrew97 - 15.04.2012
thanks man
Re: Why this Errors? -
Andrew97 - 15.04.2012
last thing::: Incluces and Definds:
[Code]#include <a_samp>
#include <a_http>
#include <a_Npc>
#include <a_objects>
#include <a_players>
#include <a_sampdb>
#include <a_vehicles>
#include <core>
#include <Datagram>
#include <file>
#include <float>
#include <String>
#include <time>
// #endif
#define RED 0xff000ff
#define GREY 0xAFAFAFAA
#define WHITE 0xFFFFFFAA
#define YELLOW 0xFFFF00AA
#define LIGHTBLUE 0x33CCFFAA
#define LIGHTGREEN 0x9ACD32AA
#define BLUE 0x5A8CA5AA
#define GREEN 0x33AA33AA
#define PURPLE 0xC2A2DAAA
#define COLOR_OTHER 0xFF6347AA
#define ORANGE 0xFF8C00AA
#define COLOR_DMV 0xFF0000F
#define COLOR_DMV2 0xaa3333AA
new players = 0;
new cars= 0;[codE]
my Script

ublic[Code] OnPlayerConnect(playerid)
{
SendClientMessage(playerid,RED,"Welcome to Player Rights Server");
SendClientMessage(playerid,YELLOW,"Admins are here to Help you if they Did anything Wrong Just tell the Owner");
SendClientMessageToAll(RED,"A player has Joined the Game");
printf("welcome to out server",1,2,3,4,5);
players+=1;
printf("there are Currently %d online",players);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
SendClientMessage(playerid,RED,"Hope to you to Come Back");
players--;
printf("there are currently %d players online ",players);
return 1;
}
[Code]
why NOthing Happen IG? why it doesn't Count the playerS

?
I don't have any FS!
Re: Why this Errors? -
Andrew97 - 15.04.2012
sorry for this
Re: Why this Errors? -
RollTi - 15.04.2012
of course you using printf which will print in server console this is the correct version
pawn Код:
new string[128];
format(string, sizeof(string), "there are Currently %d online", players);
SendClientMessage(playerid, -1, string);
put it OnPlayerDis/Connect
Re: Why this Errors? -
Andrew97 - 15.04.2012
Can you Describe for me please What is this Code?
Thank you!
Re: Why this Errors? -
Faisal_khan - 15.04.2012
Bro you used printf("there are currently %d players online ",players); this will only print in the server logs not in the client.