View Full Version : Code needed checking please...:)
geniuscrew
12-22-2002, 11:34 PM
if ($bbuserinfo[usergroupid]==6) {
if ($filesize>$amfs) {
eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
// file size too big
exit;
}
} elseif ($bbuserinfo[usergroupid]==5) {
if ($filesize>$smmfs) {
eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
// file size too big
exit;
}
} elseif ($bbuserinfo[usergroupid]==7) {
if ($filesize>$mmfs) {
eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
// file size too big
exit;
}
} else ($filesize>$avatarmaxsize) {
eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
// file size too big
exit;
}
}
I know it's wrong because I'm getting errors.
I have no idea why it's wrong lol - unexpected '{' apparently
Thank you
Link14716
12-23-2002, 01:28 AM
Take out the last } and it will work.
DrkFusion
12-23-2002, 01:50 AM
Umm maybe this may work better?
if ($bbuserinfo[usergroupid]==6) {
if ($filesize>$amfs) {
eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
// file size too big
exit;
}
} elseif ($bbuserinfo[usergroupid]==5) {
if ($filesize>$smmfs) {
eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
// file size too big
exit;
}
} elseif ($bbuserinfo[usergroupid]==7) {
if ($filesize>$mmfs) {
eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
// file size too big
exit;
} else ($filesize>$avatarmaxsize) {
eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
// file size too big
exit;
}
}
Not sure?
geniuscrew
12-23-2002, 11:21 AM
Nothing seems to be working :/
Edit: I messed around with it a little and now have problems with both of thses codes. I think they're cancelling each other out
if ($bbuserinfo[usergroupid]==6) {
if ($imginfo[0]>$amw or $imginfo[1]>$amh) {
eval("standarderror(\"".gettemplate("error_aabd")."\");");
}
} elseif ($bbuserinfo[usergroupid]==5) {
if ($imginfo[0]>$smmw or $imginfo[1]>$smmh) {
eval("standarderror(\"".gettemplate("error_smabd")."\");");
}
} elseif ($bbuserinfo[usergroupid]==7) {
if ($imginfo[0]>$mmw or $imginfo[1]>$mmh) {
eval("standarderror(\"".gettemplate("error_mabd")."\");");
}
} elseif {
if ($imginfo[0]>$avatarmaxdimension or $imginfo[1]>$avatarmaxdimension) {
eval("standarderror(\"".gettemplate("error_avatarbaddimensions")."\");");
}
}
and this one
if ($bbuserinfo[usergroupid]==6) {
if ($filesize>$amfs) {
eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
// file size too big
exit;
}
} elseif ($bbuserinfo[usergroupid]==5) {
if ($filesize>$smmfs) {
eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
// file size too big
exit;
}
} elseif ($bbuserinfo[usergroupid]==7) {
if ($filesize>$mmfs) {
eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
// file size too big
exit;
}
} elseif ($filesize>$avatarmaxsize) {
eval("standarderror(\"".gettemplate("error_avatartoobig")."\");");
// file size too big
exit;
}
}
The error i get is
Parse error: parse error, unexpected '{', expecting '(' in /home/******/*******/forum/member.php on line 1409
Thanks for any help
Link14716
12-23-2002, 12:52 PM
What exactly is line 1409?
geniuscrew
12-23-2002, 01:02 PM
} elseif { // line 1409
if ($imginfo[0]>$avatarmaxdimension or $imginfo[1]>$avatarmaxdimension) {
eval("standarderror(\"".gettemplate("error_avatarbaddimensions")."\");");
}
}
geniuscrew
12-23-2002, 09:00 PM
RAAAH! *bump*
Please help - people with custom avs can't change them and people can't view profiles!
GSHelpBoy
12-24-2002, 01:41 AM
The second code has an extra '}', I believe.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.