Just now when I wrote a script over discord, part of that script has shuffle algorithm
he asked, can I just change the [--.@range] into [.@range--] ?
Of course the answer is NO !
The reason is because .@i++ and ++.@i has a slight difference
Short answer is:
++.@i adds the value directly
.@i++ will add the value AFTER the command execute
Long answer is:
Note: when the .@i++; or ++.@i; on its own, its the same, notice the semi-colon
it only difference when put into a command, or array for example
By the way, most of my script uses ++.@i in the for-loop, because Haru said so
Subscribe to:
Post Comments (Atom)
Linux compiler error that never shown on Visual Studio
let's just admit Visual Studio sux ... ok ? right now, if you want to host a Private Ragnarok Online server, its just better to choose...
-
Ever since Hercules forked from rAthena since Jan 2013, Hercules has driven further away from its rAthena parent, many systems and feature...
-
conf\grf-files.txt //----------------------------------------- // GRF Files // Add as many as needed. //------------------------------------...
-
Useful Scripting Guides Shuffle Algorithm Sorting Algorithm What is the difference between .@i++ and ++.@i ? A simple walking npc scri...
No comments:
Post a Comment