Page 2 of 2

Posted: Mon Mar 31, 2008 9:57 am
by Luk4ward
gotenks wrote:but why do you have an if at all? it'd work the same if you removed the if statement all together, and just let the code execute,
just my stance against dirty programming
Because it will disable the callvote timelimit command for other than x values where x is below 0 or eq 0 or greater than 1, so dnt call it dirty programming 8)

Code: Select all

if &#40;timel <= 0&#41; or &#40;timel > 1&#41; then
                         et.trap_SendServerCommand&#40;cno, "cpm "^1You can vote only for end the map!\n"" &#41;
                              return 1
                             end 

Posted: Mon Mar 31, 2008 12:26 pm
by McSteve
To be fair to Gotenks, its not immediately obvious what is going on without carefully scrutinising all the code in this thread. Also if you are using timelimit 1 to end the map, then tbh you should be using:

Code: Select all

if time1 ~= 1 then
	et.trap_SendServerCommand&#40;cno, "cpm \"^1You can vote only for end the map!\n\"" &#41;
	return 1
end
/exit pedant mode

Posted: Mon Mar 31, 2008 12:39 pm
by Luk4ward
U meant to be fair with English, coz the code is not complicated. He didnt just read it as my prev posts about the logical problem, but well spotted, i just copied the code from my other mod and merged into current problem.

/pedant mode is good ;p

Posted: Wed Apr 02, 2008 11:58 am
by Major Zeman
Damn real numbers, heh.

I too thought time was an intger and therefore the code was silly.