Hi guys.
I am working on something that needs a switch, but when i compile it gives expression has no effect.
so i hope someone can explain a bit about switch and cases.
this is the part i have trouble with.
There are 5 ranks and the menu the player gets depends on his rank.
The ranks 2-5 are commented because they are'nt ready yet.
And check_user(id) is a stock that checks if user is connected to avoid runtime errors
PHP Code:
public skillmenu(id)
{
check_user(id)
new rank
rank == playerrank[id]
switch(rank)
{
case 1:
{
skillmenu_1(id)
}
/*
case 2:
{
skillmenu_2(id)
}
case 3:
{
skillmenu_3(id)
}
case 4:
{
skillmenu_4(id)
}
case 5:
{
skillmenu_5(id)
}
return PLUGIN_HANDLED*/
}
}
__________________