Leon BETA Developer
Posts : 7 Active Points : 16 Join date : 2010-10-29
| Subject: Need help with a command Fri Oct 29, 2010 12:53 pm | |
| - Code:
-
COMMAND:morning(playerid,params[]) { { if(level[playerid] >= 1) if(IsPlayerConnected(playerid)) return SetPlayerTime(playerid,7,0); } SendClientMessageToAll(playerid,"Morning!"); } else SendClientMessage(playerid,red,"ERROR: You need to be a Premium Player to use this command"); return 1; } Help me anybody? | |
|
Weponz Founder/BETA Developer
Posts : 62 Active Points : 157 Join date : 2010-10-21 Age : 35 Location : Australia
| Subject: Re: Need help with a command Fri Oct 29, 2010 12:56 pm | |
| - Leon wrote:
-
- Code:
-
COMMAND:morning(playerid,params[]) { { if(level[playerid] >= 1) if(IsPlayerConnected(playerid)) return SetPlayerTime(playerid,7,0); } SendClientMessageToAll(playerid,"Morning!"); } else SendClientMessage(playerid,red,"ERROR: You need to be a Premium Player to use this command"); return 1; } Help me anybody? Post errors.. | |
|
Leon BETA Developer
Posts : 7 Active Points : 16 Join date : 2010-10-29
| Subject: Re: Need help with a command Fri Oct 29, 2010 12:57 pm | |
| - Code:
-
C:\Users\Maple\Desktop\Premium\filterscripts\Premium.pwn(245) : warning 217: loose indentation C:\Users\Maple\Desktop\Premium\filterscripts\Premium.pwn(246) : warning 209: function "cmd_morning" should return a value C:\Users\Maple\Desktop\Premium\filterscripts\Premium.pwn(246) : error 010: invalid function or declaration C:\Users\Maple\Desktop\Premium\filterscripts\Premium.pwn(247) : error 010: invalid function or declaration | |
|
Weponz Founder/BETA Developer
Posts : 62 Active Points : 157 Join date : 2010-10-21 Age : 35 Location : Australia
| Subject: Re: Need help with a command Fri Oct 29, 2010 1:03 pm | |
| - Leon wrote:
-
- Code:
-
COMMAND:morning(playerid,params[]) { { if(level[playerid] >= 1) if(IsPlayerConnected(playerid)) return SetPlayerTime(playerid,7,0); } SendClientMessageToAll(playerid,"Morning!"); } else SendClientMessage(playerid,red,"ERROR: You need to be a Premium Player to use this command"); return 1; } Change that to: - Code:
-
cmd_morning(playerid,params[]) { if(level[playerid] >= 1) if(IsPlayerConnected(playerid)) return SetPlayerTime(playerid,7,0); } SendClientMessageToAll(playerid,"Morning!"); } else SendClientMessage(playerid,red,"ERROR: You need to be a Premium Player to use this command"); return 1; } Should work.. | |
|
Sponsored content
| Subject: Re: Need help with a command | |
| |
|