help about clan
#8

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..
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
You need to change the saving clan name line to string according to saving system you use..
Reply


Messages In This Thread
help about clan - by mehdimmz - 01.11.2014, 11:12
Re: help about clan - by dominik523 - 01.11.2014, 11:17
Re: help about clan - by mehdimmz - 01.11.2014, 11:36
Re: help about clan - by Sawalha - 01.11.2014, 11:45
Re: help about clan - by mehdimmz - 01.11.2014, 11:50
Re: help about clan - by Sawalha - 01.11.2014, 11:51
Re: help about clan - by mehdimmz - 01.11.2014, 12:02
Re: help about clan - by BroZeus - 01.11.2014, 12:26
Re: help about clan - by mehdimmz - 01.11.2014, 14:28
Re: help about clan - by mehdimmz - 01.11.2014, 15:30

Forum Jump:


Users browsing this thread: 6 Guest(s)