• Welcome to Vice City Multiplayer.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Kirke

#1
#2
mIRC/pawn Scripting / Re: Approximation
January 20, 2010, 08:01:54 PM
well, as long as i know the calculation works, the alias name seem to be the problem (im putting that down to a conflicting name in your script)
#3
mIRC/pawn Scripting / Re: Approximation
January 20, 2010, 07:47:41 PM
ok, yea, sorry for pissing you off. but my way is right.

lets look at this from another angle.

why do you think the alias name should be prefixed with vcmp.  ?

can you check you have no other alias names with SetWholeNumber for me.

PS. your way is right too, btw.

Im just interested why its returning 8 when a value of 4.5 is passed to it. as its only returning $celi or $floor of 4.5
#4
mIRC/pawn Scripting / Re: Approximation
January 20, 2010, 06:46:24 PM
no offense intended Skirmant, but your an idiot!


the alias name is irreverent, as long as you don't have any conflicting names,

unless you apply the -l switch which stands for "local alias".

it makes NO difference to the result if the alias is vcmp.blah or just blah
#5
mIRC/pawn Scripting / Re: Approximation
January 20, 2010, 06:34:21 PM
oh mate, thats bad.

you cannot lead people to believe that you must have vcmp. as part of the alias name.

Do you know how silly that sounds ?

kind regards

Accepted Solution:


alias SetWholeNumber !return $iif($gettok($1,2,46) >= 5,$ceil($1),$floor($1))
#6
mIRC/pawn Scripting / Re: Approximation
January 20, 2010, 06:24:27 PM
ok, your talking utter rubbish now. you've wasted a whole thread when the example i gave you worked perfectly fine. (which has now probably confused other people)
#7
mIRC/pawn Scripting / Re: Approximation
January 20, 2010, 06:22:12 PM
i would quite like to know how on earth your getting it to return 8.

its only returning either $celi or $floor of your passed parameter (in this case 4.6)

PS, would other people check this works:

alias SetWholeNumber !return $iif($gettok($1,2,46) >= 5,$ceil($1),$floor($1))

//echo -a $SetWholeNumber(4.6) - should return 5

//echo -a $SetWholeNumber(4.2) - should return 4
#8
mIRC/pawn Scripting / Re: Approximation
January 20, 2010, 06:14:32 PM
alias SetWholeNumber !return $iif($gettok($1,2,46) >= 5,$ceil($1),$floor($1))

care to explain how that would ever return 8 if passed the value 4.6 ?

its using $gettok to check if the value has a remainder 5 or over

if $true return the next highest integer. $celi

if $false the next lowest integer. $floor
#9
mIRC/pawn Scripting / Re: Approximation
January 20, 2010, 05:33:34 PM
returns 5 for me, just like it should do.

not sure why its retunging 8 for you, make your own.


you know what you need to do now,
use
$celi and $floor read the help manual, come on, its basic maths
#10
mIRC/pawn Scripting / Re: Approximation
January 20, 2010, 05:27:43 PM
come on, this is basic maths

http://www.mathwizz.com/fractions/help/help13.htm

that alias i gave you works perfectly fine.


alias SetWholeNumber !return $iif($gettok($1,2,46) >= 5,$ceil($1),$floor($1))

always returns 8 ?

what the heck are you typing ?

type //echo -a $SetWholeNumber(4.2)

//echo -a $SetWholeNumber(4.6)

or you on drugs by any chance ?
#11
mIRC/pawn Scripting / Re: Approximation
January 20, 2010, 05:13:51 PM
You want to "round to next nearest whole number"

You need to create your own procedure to do the following;

$ceil(N) -  Returns N rounded to the next highest integer.

$floor(N) - Returns N rounded to the next lowest integer.


I did it for you :-)


alias SetWholeNumber !return $iif($gettok($1,2,46) >= 5,$ceil($1),$floor($1))

Type //echo -a $SetWholeNumber(4.6) and //echo -a $SetWholeNumber(4.2)
#12
Support / Re: Adding Objects
January 20, 2010, 04:28:41 PM
ok, thankyou

xx
#13
Support / Re: Adding Objects
January 20, 2010, 04:21:43 PM
oh gosh, srry. i didn't realize. would you explain why we cant add objects, or point me to a thread which does explain.

Thankyou

xx
#14
UltraMegaServer / Re: Hack situation at the Server
January 20, 2010, 04:18:51 PM
Getting better, but still hackers about!

TZ: 17:18 CET
#15
Support / Adding Objects
January 20, 2010, 03:22:58 PM
I am trying to make a stunt script like my one in samp but i feel rather limited when trying in vcmp

would you allow us to insert objects like ramps etc please.

Thankyou

xx