26.05.2020, 15:42
Quote:
From what I see, your variable name rolename is an array. So the check should be like this:
|
pawn Code:
new DCC_Role:role, rolename[128];//<<<<<<<<<<<<<<<<<<<<
DCC_GetRoleName(role, rolename, 128);//<<<<<<<<<<<<<<<<<<<<
pawn Code:
new rolename[128];
DCC_GetRoleName(author, rolename, 128);
EDIT: This code :
pawn Code:
if(!strcmp(rolename, g_Role_Level_1, false)) {
//My action
}
Code:
error 035: argument type mismatch (argument 2)
pawn Code:
new DCC_Role:g_Role_Level_1;
new DCC_Role:g_Role_Level_2;
new DCC_Role:g_Role_Level_3;
new DCC_Role:g_Role_Level_4;
new DCC_Role:g_Role_Level_5;
new DCC_Role:g_Role_Level_6;
new DCC_Role:g_Role_Level_7;
new DCC_Role:g_Role_Level_8;
pawn Code:
g_Role_Level_1 = DCC_FindRoleById("myroleid");
g_Role_Level_2 = DCC_FindRoleById("myroleid");
g_Role_Level_3 = DCC_FindRoleById("myroleid");
g_Role_Level_4 = DCC_FindRoleById("myroleid");
g_Role_Level_5 = DCC_FindRoleById("myroleid");
g_Role_Level_6 = DCC_FindRoleById("myroleid");
g_Role_Level_7 = DCC_FindRoleById("myroleid");
g_Role_Level_8 = DCC_FindRoleById("myroleid");