I am receiving a lvalue (non-constant) error on 2 different lines
#1

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


Messages In This Thread
I am receiving a lvalue (non-constant) error on 2 different lines - by Disorder - 02.09.2016, 21:14
Respuesta: I am receiving a lvalue (non-constant) error on 2 different lines - by HidroDF - 02.09.2016, 22:43
Re: I am receiving a lvalue (non-constant) error on 2 different lines - by jwh - 02.09.2016, 22:59

Forum Jump:


Users browsing this thread: 1 Guest(s)