02.09.2016, 21:14
I am attempting to make the server tell everybody when connected how many users are online. Here are my lines below:
ERRORS Receiving:
C:\Users\Parent\Desktop\My Samp Server(BETA)\gamemodes\testtwo.pwn(63) : error 022: must be lvalue (non-constant)
C:\Users\Parent\Desktop\My Samp Server(BETA)\gamemodes\testtwo.pwn(73) : error 022: must be lvalue (non-constant)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
(LINE 58-66)
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, 0x7BFF00, "Welcome To My First Server");
playersconnected[0]++;
new string[100];
format(string, sizeof(string), "There are currently %d people in the server.", playersconnected++);
SendClientMessageToAll(0xE81A1AFF, string);
return 1;
}
(LINE 68-76):
public OnPlayerDisconnect(playerid, reason)
{
SendClientMessage(playerid, 0x7BFF00, "Welcome To My First Server");
playersconnected[0]--;
new string[100];
format(string, sizeof(string), "There are currently %d people in the server.", playersconnected--);
SendClientMessageToAll(0xE81A1AFF, string);
return 1;
}
ERRORS Receiving:
C:\Users\Parent\Desktop\My Samp Server(BETA)\gamemodes\testtwo.pwn(63) : error 022: must be lvalue (non-constant)
C:\Users\Parent\Desktop\My Samp Server(BETA)\gamemodes\testtwo.pwn(73) : error 022: must be lvalue (non-constant)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
(LINE 58-66)
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid, 0x7BFF00, "Welcome To My First Server");
playersconnected[0]++;
new string[100];
format(string, sizeof(string), "There are currently %d people in the server.", playersconnected++);
SendClientMessageToAll(0xE81A1AFF, string);
return 1;
}
(LINE 68-76):
public OnPlayerDisconnect(playerid, reason)
{
SendClientMessage(playerid, 0x7BFF00, "Welcome To My First Server");
playersconnected[0]--;
new string[100];
format(string, sizeof(string), "There are currently %d people in the server.", playersconnected--);
SendClientMessageToAll(0xE81A1AFF, string);
return 1;
}