AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   easy way ? (https://forums.alliedmods.net/showthread.php?t=203835)

Mr.Waffle 12-23-2012 19:05

easy way ?
 
hello,
there is a better/easy way how to Compare them to 0?
PHP Code:

        Ver] = 0
        Ver
] = 0
        Ver
] = 0
        Ver
] = 0
        Ver
] = 0
        Ver
] = 0
        Ver
] = 0
        Ver
] = 0
        Ver
] = 0
        Ver
10 ] = 0
        Ver
11 ] = 0
        Ver
12 ] = 0
        Ver
13 ] = 0
        Ver
14 ] = 0
        Ver
15 ] = 0
        Ver
16 ] = 0
        Ver
17 ] = 0
        Ver
18 ] = 0
        Ver
19 ] = 0
        Ver
20 ] = 

thanks.

victorngl 12-23-2012 19:16

Re: easy way ?
 
PHP Code:

for( new 0sizeofVer ); i++)
        
Ver] = 


hleV 12-23-2012 19:23

Re: easy way ?
 
Code:
arrayset(Ver, 0, sizeof Ver);

fysiks 12-23-2012 20:33

Re: easy way ?
 
You aren't comparing anything . . .

Mr.Waffle 12-24-2012 00:35

Re: easy way ?
 
Quote:

Originally Posted by fysiks (Post 1859355)
You aren't comparing anything . . .

o.O ofc im . im comparing them to zero .
after i changed there Value.

fysiks 12-24-2012 01:21

Re: easy way ?
 
Quote:

Originally Posted by Mr.Waffle (Post 1859443)
o.O ofc im . im comparing them to zero .
after i changed there Value.

No, you are assigning them to zero. There is no comparing in your code above. If you did in fact mean "assign" then hleV has given you the best answer.


All times are GMT -4. The time now is 13:43.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.