Help me with the errors pls
#1

So I've put a script for a command "/go", and I've got some errors

This is the code
Код:
CMD:go(playerid, params[]) {
if(PlayerInfo[playerid][pAdminLevel] > 0) {
ShowPlayerDialog(playerid, DIALOG_GO, DIALOG_STYLE_LIST, "SERVER: Teleport Locations", "House Interiors\nRace Tracks\nCity Locations\nPopular Locations\nGym Interiors\nOther", "Select", "Cancel");
}
else return SendClientMessage(playerid, COLOR_WHITE, AdminOnly);
return 1;
}
And there are the errors: http://imgur.com/a/84I8i

Can you fix this pls
Reply
#2

PHP код:
//For DIALOG_GO error
#define DIALOG_GO 200
//For pAdminlevel error
enum pInfo
{
    
pAdminLevel
}
new 
PlayerInfo[MAX_PLAYERS][pInfo];
CMD:go(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdminLevel] > 0)
    {
        
ShowPlayerDialog(playeridDIALOG_GODIALOG_STYLE_LIST"SERVER: Teleport Locations""House Interiors\nRace Tracks\nCity Locations\nPopular Locations\nGym Interiors\nOther""Select""Cancel");
    }
    else return 
SendClientMessage(playeridCOLOR_WHITE"Only admins are allowed to use this command!);
    return 1;

Reply
#3

Quote:
Originally Posted by IceBilizard
Посмотреть сообщение
PHP код:
//For DIALOG_GO error
#define DIALOG_GO 200
//For pAdminlevel error
enum pInfo
{
    
pAdminLevel
}
new 
PlayerInfo[MAX_PLAYERS][pInfo];
CMD:go(playeridparams[])
{
    if(
PlayerInfo[playerid][pAdminLevel] > 0)
    {
        
ShowPlayerDialog(playeridDIALOG_GODIALOG_STYLE_LIST"SERVER: Teleport Locations""House Interiors\nRace Tracks\nCity Locations\nPopular Locations\nGym Interiors\nOther""Select""Cancel");
    }
    else return 
SendClientMessage(playeridCOLOR_WHITE"Only admins are allowed to use this command!);
    return 1;

It still gives me errors...
Reply
#4

IceBilizard - Edited

Код:
//For DIALOG_GO error 

#define DIALOG_GO 200 

//For pAdminlevel error 

enum pInfo 
{ 
    pAdminLevel 
} 
new PlayerInfo[MAX_PLAYERS][pInfo]; 

CMD:go(playerid) 
{ 
    if(PlayerInfo[playerid][pAdminLevel]) ShowPlayerDialog(playerid, DIALOG_GO, DIALOG_STYLE_LIST, "SERVER: Teleport Locations", "House Interiors\nRace Tracks\nCity Locations\nPopular Locations\nGym Interiors\nOther", "Select", "Cancel"); 
    else SendClientMessage(playerid, COLOR_WHITE, "Only admins are allowed to use this command!"); 
    return 1; 
}
Reply
#5

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
IceBilizard - Edited

Код:
//For DIALOG_GO error 

#define DIALOG_GO 200 

//For pAdminlevel error 

enum pInfo 
{ 
    pAdminLevel 
} 
new PlayerInfo[MAX_PLAYERS][pInfo]; 

CMD:go(playerid) 
{ 
    if(PlayerInfo[playerid][pAdminLevel]) ShowPlayerDialog(playerid, DIALOG_GO, DIALOG_STYLE_LIST, "SERVER: Teleport Locations", "House Interiors\nRace Tracks\nCity Locations\nPopular Locations\nGym Interiors\nOther", "Select", "Cancel"); 
    else SendClientMessage(playerid, COLOR_WHITE, "Only admins are allowed to use this command!"); 
    return 1; 
}
For the pAdminLevel script it gave me 26 errors...
Reply
#6

These errors are not of this code.
Make sure you put in the right place and if the YOUR script that's right with closed brackets .
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)