20.03.2010, 16:26
How do I check if one string equals to another one?
thanks,
thanks,
if(string1 == string2) {
//dothis
} else {
//dothis
}
Originally Posted by borisblat
thx MadeMan,
and jameskmonger, this thing used only for numbers no? |
for(new id = 1; id<=MAX_CLANS; id++) { clanname = GetClanName(id); format(cfile, sizeof(cfile), "Blat/Clans/%s.txt", clanname); unionname2 = dini_Get(cfile, "Union"); if(strcmp(unionname2,unionname, true) == 0) dini_Unset(cfile, "Union"); }
stock GetClanName(clanid) { new file[256], clanname[256]; format(file, sizeof(file), "Blat/Clans/IDs/%d.txt", clanid); clanname = dini_Get(file, "Name"); return clanname; }
Originally Posted by borisblat
and jameskmonger, this thing used only for numbers no?
|
Originally Posted by jameskmonger
What do you mean?
|
Originally Posted by jameskmonger
pawn Код:
|
Originally Posted by Don Correlli
Quote:
Quote:
|
Originally Posted by jameskmonger
Can't you compare strings? (I'm used to Java xD)
|