AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Need help with my compiling errors!! (https://forums.alliedmods.net/showthread.php?t=206211)

WeeZick 01-19-2013 18:54

Need help with my compiling errors!!
 
Line <131> : error 032: array index out of bounds <variable "g_msgFade">

Line <363> : error 032: array index out of bounds <variable "Rank_Tags">

Line <382> : error 035: argument type mismatch <argument 2>

1. message_begin(MSG_ONE, g_msgFade[33], {0,0,0}, id);

2. formatex(Temp,63, "\\r%s", Rank_Tags[3])

3. ColorChat(0, "!g[%s]!team %s!y gives!team %s!y a new Rank. !g[%s]!y", TAG_Chat, szName2, szName, Rank_Tags[key+1])

AngeIII 01-19-2013 18:59

Re: Need help with my compiling errors!!
 
plugin source?

WeeZick 01-19-2013 19:07

Re: Need help with my compiling errors!!
 
What you mean?

wickedd 01-19-2013 19:28

Re: Need help with my compiling errors!!
 
He means, post the code or attach the plugin.

WeeZick 01-19-2013 19:29

Re: Need help with my compiling errors!!
 
The code is private :(

wickedd 01-19-2013 19:30

Re: Need help with my compiling errors!!
 
Then go ask the author for help.

WeeZick 01-19-2013 19:33

Re: Need help with my compiling errors!!
 
Do i need to post the whole code?

WeeZick 01-19-2013 19:37

Re: Need help with my compiling errors!!
 
/*
new g_Tag[33][10];
new Name[32], g_msgFade[33];
new playerKey[33], playerTarget[33], playerReason[33], playerInfo[33][2], bool:playerMuted[33];
new bool:Vote_Running, iVote[2];
new cAdvancedBans, cBanTime
new iMaxPlayers
*/


register_concmd("give_rank", "GiveRank", ADMIN_RCON, "<nick, userid, authid> <rank>")

public GiveRank (id) {
new Rankmenu, Temp[64]
formatex(Temp,63, "\\r[\\r%s\\r] \\wChoose a Rank:", TAG_Chat)
Rankmenu = menu_create(Temp, "RankHandler");
formatex(Temp,63, "\\r%s", Rank_Tags[1])
menu_additem(Rankmenu, Temp, "1", 0);
formatex(Temp,63, "\\r%s", Rank_Tags[2])
menu_additem(Rankmenu, Temp, "2", 0);
formatex(Temp,63, "\\r%s", Rank_Tags[3])
menu_additem(Rankmenu, Temp, "3", 0);
menu_display(id, Rankmenu);
return PLUGIN_HANDLED;
}

public RankHandler(id, menu, key) {
if( key == MENU_EXIT ) {
menu_destroy(menu);
ScreenFadeOut(id)
return PLUGIN_HANDLED;
}
new szName[32], szName2[32], steam_id[21];
get_user_name(Name[id], szName, 31)
get_user_name(id, szName2, 31)
get_user_authid(Name[id], steam_id, 20)

copy(g_Tag[id],9,Rank_Tags[key+1])
if(is_user_connected(id) && is_user_connected(Name[id]))
ColorChat(0, "!g[%s]!team %s!y gives!team %s!y a new Rank. !g[%s]!y", TAG_Chat, szName2, szName, Rank_Tags[key+1])

menu_destroy(menu);
ScreenFadeOut(id);
return PLUGIN_HANDLED;
}

WeeZick 01-19-2013 19:38

Re: Need help with my compiling errors!!
 
Just so you know it is a Admin Menu

YamiKaitou 01-19-2013 20:15

Re: Need help with my compiling errors!!
 
1) There is no index 33 in that array
2) There is no index 3 in that array
3) Argument #2 is the wrong type


All times are GMT -4. The time now is 13:40.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.