New Small Admin Script.
#1

hi I'm Toni,
I am creating a free roam script, hopefully be done soon, and I'm have problems with LuxAdmin (ldudb.inc) won't work...line 44: MAX_STRING shit... But Oh well.
I'm trying to fix this 1 error i have, but i have no clue, since I'm new to scripting i have trouble from time to time.
This is the Error Msg:
C:\Users\Anthony Nam Tang\Desktop\Server(s)\Freeroam\gamemodes\freeroam .pwn(55) : warning 202: number of arguments does not match definition
C:\Users\Anthony Nam Tang\Desktop\Server(s)\Freeroam\gamemodes\freeroam .pwn(187) : error 029: invalid expression, assumed zero
C:\Users\Anthony Nam Tang\Desktop\Server(s)\Freeroam\gamemodes\freeroam .pwn(217) : error 030: compound statement not closed at the end of file (started at line 111)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
The Compound statement not closed at the end of file i can fix easily, its just "C:\Users\Anthony Nam Tang\Desktop\Server(s)\Freeroam\gamemodes\freeroam .pwn(187) : error 029: invalid expression, assumed zero" problem i have.
this is the small 3 level admin script i was gonna make:
Код:
//==============================================================================
//============================Admin Section=====================================
//==============================================================================
	if(strcmp("/ah", cmdtext, true) == 0 || strcmp("/ahelp", cmdtext, true) == 0)
	{
	  if(IsPlayerConnected(playerid,))
	  {
	    if(PlayerInfo[playerid][pAdmin] > 0)
	    {
	      if(PlayerInfo[playerid][pAdmin] >= 1)
	      {
	        SendClientMessage(playerid, COLOR_YELLOW, "==================Level 1======================");
	        SendClientMessage(playerid, COLOR_YELLOW, "/kick - /jail [id] [time] - /unjail - /freeze - /unfreeze");
	        SendClientMessage(playerid, COLOR_YELLOW, "/mute - /unmute - /spectate -/spectateoff");
	        SendClientMessage(playerid, COLOR_YELLOW, "================================================");
				}
				if(PlayerInfo[playerid][pAdmin] >= 2)
				{
				  SendClientMessage(playerid, COLOR_YELLOW, "==================Level 2=======================");
				  SendClientMessage(playerid, COLOR_YELLOW, "/ban - /ma - /nma (no more admin) - /pkill");
					SendClientMessage(playerid, COLOR_YELLOW, "note: /makeadmin can only make level 1 admins.");
					SendClientMessage(playerid, COLOR_YELLOW, "================================================");
				}
	            if(PlayerInfo[playerid][pAdmin] >= 3)
				{
				  SendClientMessage(playerid, COLOR_YELLOW, "==================Level 3=======================");
				  SendClientMessage(playerid, COLOR_YELLOW, "/sg [gravity] - /maa - /maaa - /nuke - /airstrike - /gmx");
				  SendClientMessage(playerid, COLOR_YELLOW, "Note: /gmx will restart Server, Use for updates only.");
				  SendClientMessage(playerid, COLOR_YELLOW, "================================================");
				}
			}
		}
		return 1;
	}
Apparently, if(IsPlayerConnected(playerid,)) is wrong, here are my enum so far.
Код:
enum pInfo
{
	pConnecTime,
	pAdmin,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
I had the problem with the admin part, but i fixed it with:
Код:
enum PInfo
{
    pAdmin,
};
new PlayerInfo[MAX_PLAYERS][pInfo];
Can Anyone Please help me on this, thanks again

-Toni
Reply
#2

The last error, has something to do with your returns.

I always have

return 1;
}
return 0;
}
}

At the end of my script's or cmd lines.

That usually works for me.

PM me your script, and I will fix it for you.
Reply
#3

Very Thanks, I'll Test it, if it doesn't work, i'll pm you it.
Reply
#4

I got it done.. Thanks anyway.
Reply
#5

Welcome to samp scripting toni.
-First, read the rules. One of the first rules is, no double posting.

And a freindly advice, you can fix your errors by useing the search button. theres plenty of people that has the same errors as you.


Niixie
Reply
#6

Thanks. sorry about double post.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)