banimod / etpro / ettv forums Forum Index banimod / etpro / ettv forums
Bani's Discussion Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

lua end map
Goto page Previous  1, 2
 
Post new topic   Reply to topic    banimod / etpro / ettv forums Forum Index -> ET Modding
View previous topic :: View next topic  
Author Message
Luk4ward



Joined: 30 Jul 2006
Posts: 236
Location: Poland

PostPosted: Mon Mar 31, 2008 9:57 am    Post subject: Reply with quote

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 Cool

Code:

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

_________________
wolFTeam.pl
Back to top
View user's profile Send private message Visit poster's website
McSteve



Joined: 12 Sep 2006
Posts: 113

PostPosted: Mon Mar 31, 2008 12:26 pm    Post subject: Reply with quote

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:

if time1 ~= 1 then
   et.trap_SendServerCommand(cno, "cpm \"^1You can vote only for end the map!\n\"" )
   return 1
end


/exit pedant mode
_________________
GhosT:McSteve
Ghostworks Gaming Community
Back to top
View user's profile Send private message
Luk4ward



Joined: 30 Jul 2006
Posts: 236
Location: Poland

PostPosted: Mon Mar 31, 2008 12:39 pm    Post subject: Reply with quote

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
_________________
wolFTeam.pl
Back to top
View user's profile Send private message Visit poster's website
Major Zeman



Joined: 20 Mar 2007
Posts: 16
Location: Czech Republic

PostPosted: Wed Apr 02, 2008 11:58 am    Post subject: Reply with quote

Damn real numbers, heh.

I too thought time was an intger and therefore the code was silly.
_________________
lua > me
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    banimod / etpro / ettv forums Forum Index -> ET Modding All times are GMT - 8 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group