01.11.2014, 12:26
You are confused between int and string varaibles...
In the command you are using 'Clan' as a string but in comparing you are using it as a int and also in writing data to user file u are using it as int...which is not possible
So i am gonna show u how to compare strings in 2 dimension array..
You need to change the saving clan name line to string according to saving system you use..
In the command you are using 'Clan' as a string but in comparing you are using it as a int and also in writing data to user file u are using it as int...which is not possible
So i am gonna show u how to compare strings in 2 dimension array..
pawn Code:
new Clan[MAX_PLAYERS][24];//Variable declaration
#define isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1])))) // paste this at top we will use this to see if string is empty or not...
Clan[0][1]= "Some Clan";//WRONG
Clan[0] = "Some Clan";//RIGHT
if(Clan[1] == 0)//WRONG
if(isnull(Clan[1]))//RIGHT
//now we are gonna see how to make a string null( to use during when player leaves clan)
Clan[0] = 0;//WRONG
Clan[0] = '\0';//RIGHT
// \0 stands for null