Discord DCC_GetRoleName
#3

Quote:
Originally Posted by SharpenBlade
View Post
From what I see, your variable name rolename is an array. So the check should be like this:
So, is this already correct? Because i dont even think so.
pawn Code:
new DCC_Role:role, rolename[128];//<<<<<<<<<<<<<<<<<<<<
    DCC_GetRoleName(role, rolename, 128);//<<<<<<<<<<<<<<<<<<<<
I tried to get the 'author's role by this (check the code at the top to see 'author'):
pawn Code:
new rolename[128];
    DCC_GetRoleName(author, rolename, 128);
Which is the correct one? Or how can i make the correct one?

EDIT: This code :
pawn Code:
if(!strcmp(rolename, g_Role_Level_1, false)) {
    //My action
}
Shows this error :
Code:
error 035: argument type mismatch (argument 2)
EDIT: I got this :
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;
And this under OnGameModeInit()

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");
Reply


Messages In This Thread
Discord DCC_GetRoleName - by Filbert - 26.05.2020, 15:03
Re: Discord DCC_GetRoleName - by SharpenBlade - 26.05.2020, 15:10
Re: Discord DCC_GetRoleName - by Filbert - 26.05.2020, 15:42
Re: Discord DCC_GetRoleName - by Filbert - 26.05.2020, 20:01
Re: Discord DCC_GetRoleName - by Filbert - 27.05.2020, 04:27
Re: Discord DCC_GetRoleName - by Kwarde - 27.05.2020, 10:29
Re: Discord DCC_GetRoleName - by Filbert - 27.05.2020, 11:06
Re: Discord DCC_GetRoleName - by Kwarde - 27.05.2020, 21:14

Forum Jump:


Users browsing this thread: 1 Guest(s)