public OnPlayerConnect(playerid)
{
new str[500];
new rows, fields;
cache_get_data(rows, fields, dbHandle);
if(rows)
{
format(msg, sizeof(msg), "Welcome to Molotov Roleplay Gaming, %s\nThis user was found in our database, please enter your password below to login.\n\nYou have 60 seconds to login.", GetName(playerid));
ShowDialog(playerid, Show:<Login>, DIALOG_STYLE_INPUT, ""EMBED_YELLOW"Molotov Roleplay Gaming Login"EMBED_WHITE"", msg, "Login", "Quit");
LoginTimer{playerid} = SetTimerEx("CheckPlayerLogged", 60000, 0, "i", playerid);
}
else
{
ShowDialog(playerid, Show:<ConfirmWord>, DIALOG_STYLE_INPUT, ""EMBED_RED"Secret word confirmation"EMBED_WHITE"", ""EMBED_WHITE"The IP you are using is not the same for\nthis account, please enter the secret word of the player.", "Okay", "Exit");
}
else
{
SetIntVar(playerid, "RegisterPart", 1);
format(str, sizeof(str), ""EMBED_WHITE"Welcome to Molotov Roleplay Gaming, "EMBED_RED"%s\n"EMBED_WHITE"This user was not found in our database, please enter a password below to register.", GetName(playerid));
ShowDialog(playerid, Show:<Register>, DIALOG_STYLE_INPUT, ""EMBED_YELLOW"Molotov Roleplay Gaming Registration"EMBED_WHITE"", str, "Register", "Quit");
}
return 1;
}
C:\Users\YakupMalikDavut\Desktop\RoleplayRoleplay\host\hrp\gamemodes\rprp.pwn(1123) : error 029: invalid expression, assumed zero C:\Users\YakupMalikDavut\Desktop\RoleplayRoleplay\host\hrp\gamemodes\rprp.pwn(1129) : warning 217: loose indentation Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error.
else
return 1;
|
You can't use else twice, it's illogical think. That second warning is bad routing code.
|
public OnPlayerConnect(playerid)
{
new str[500];
new rows, fields;
cache_get_data(rows, fields, dbHandle);
if(rows)
{
format(msg, sizeof(msg), "Welcome to Molotov Roleplay Gaming, %s\nThis user was found in our database, please enter your password below to login.\n\nYou have 60 seconds to login.", GetName(playerid));
ShowDialog(playerid, Show:<Login>, DIALOG_STYLE_INPUT, ""EMBED_YELLOW"Molotov Roleplay Gaming Login"EMBED_WHITE"", msg, "Login", "Quit");
LoginTimer{playerid} = SetTimerEx("CheckPlayerLogged", 60000, 0, "i", playerid);
}
//That above is performed when player is registered.
else
{
ShowDialog(playerid, Show:<ConfirmWord>, DIALOG_STYLE_INPUT, ""EMBED_RED"Secret word confirmation"EMBED_WHITE"", ""EMBED_WHITE"The IP you are using is not the same for\nthis account, please enter the secret word of the player.", "Okay", "Exit");
}
//This above you want to perform when?
else
{
SetIntVar(playerid, "RegisterPart", 1);
format(str, sizeof(str), ""EMBED_WHITE"Welcome to Molotov Roleplay Gaming, "EMBED_RED"%s\n"EMBED_WHITE"This user was not found in our database, please enter a password below to register.", GetName(playerid));
ShowDialog(playerid, Show:<Register>, DIALOG_STYLE_INPUT, ""EMBED_YELLOW"Molotov Roleplay Gaming Registration"EMBED_WHITE"", str, "Register", "Quit");
}
//This above is performed when player is not registered.
return 1;
}
If this is this
do this
else if it's whatever it's not
do this
else if it's whatever it's not not and not the first
do this.
ShowDialog(playerid, Show:<ConfirmWord>, DIALOG_STYLE_INPUT, ""EMBED_RED"Secret word confirmation"EMBED_WHITE"", ""EMBED_WHITE"The IP you are using is not the same for\nthis account, please enter the secret word of the player.", "Okay", "Exit");
}
else
{
ShowDialog(playerid, Show:<ConfirmWord>, DIALOG_STYLE_INPUT, ""EMBED_RED"Secret word confirmation"EMBED_WHITE"", ""EMBED_WHITE"The IP you are using is not the same for\nthis account, please enter the secret word of the player.", "Okay", "Exit");
}
public OnPlayerConnect(playerid, PlayerText:playertextid)
PlayerText:playertextid
C:\Users\YakupMalikDavut\Desktop\RoleplayRoleplay\Test servers\hrp\gamemodes\rprp.pwn(1108) : error 025: function heading differs from prototype