[HELP] Register/login error from GF
#1

Hey can you help me ? I have Errors but i dont know what to do...

There i have the errors...

if(Security = 0);

And my errors are :

error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Reply
#2

Quote:
Originally Posted by xivo
if(Security = 0);
You can't use an if-statement like that.

Correct:
pawn Код:
if(Security == 0)
{
  // your code.
}
Reply
#3

first you can start with a public function i guess...like...
pawn Код:
public OnePlayerConnect
if(blablabla == 0)
// your code
return 1;
i am noob at scripting but maybe will work try
Reply
#4

Код:
public OnPlayerConnect(playerid)
{
SendClientMessageToAll(0x00FF00FF,"Der Spieler %s hat den Server betreten!");
{
    if(Security == 0)
	 {
	  SendClientMessage(playerid, COLOR_YELLOW, "Host has broken one of the Agreement rules, action has been taken.");
	  Kick(playerid);
	  return 1;
	}
That is the Part of the Script
But i have these Errors !

Код:
error 029: invalid expression, assumed zero
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Reply
#5

Quote:
Originally Posted by xivo
Код:
public OnPlayerConnect(playerid)
{
SendClientMessageToAll(0x00FF00FF,"Der Spieler %s hat den Server betreten!");
{
    if(Security == 0)
	 {
	  SendClientMessage(playerid, COLOR_YELLOW, "Host has broken one of the Agreement rules, action has been taken.");
	  Kick(playerid);
	  return 1;
	}
might be

pawn Код:
public OnPlayerConnect(playerid)
{
  new string[0x80],name[24];
  GetPlayerName(playerid,name,sizeof name);
  format(string,sizeof string,"Der Spieler %s hat den Server betreten !",name);
  SendClientMessageToAll(0x00FF00FF,string);
  if(Security == 0)
  {
   SendClientMessage(playerid, COLOR_YELLOW, "Host has broken one of the Agreement rules, action has been taken.");
   Kick(playerid);
   return 1;  
  }
  // OnPlayerConnect Stuff - Continue -
}

Reply
#6

Thanks ^^

But the problem is here

if(Security() == 1/0);

error 029: invalid expression, assumed zero
error 001: expected token: ")", but found ";"
error 036: empty statement
fatal error 107: too many error messages on one line
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)