• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua For

Fire Element

Member
Joined
Sep 10, 2010
Messages
193
Reaction score
22
Location
Brazil
what's the difference?

-- This function add ml until 157
Lua:
for i = 1, 5 do
     doPlayerAddSkill(cid, SKILL__MAGLEVEL, 1, true)
end

-- This function add ml until large amount... 200, example
Lua:
for i = 1, 10 do
     doPlayerAddSkill(cid, SKILL__MAGLEVEL, 1, true)
end
 
Last edited:
First will loop 5 times and second 10.

Lua:
for i = 1, 5 do
     doPlayerAddSkill(cid, SKILL__MAGLEVEL, 1, true)
end
Same as:
Lua:
doPlayerAddSkill(cid, SKILL__MAGLEVEL, 1, true)
doPlayerAddSkill(cid, SKILL__MAGLEVEL, 1, true)
doPlayerAddSkill(cid, SKILL__MAGLEVEL, 1, true)
doPlayerAddSkill(cid, SKILL__MAGLEVEL, 1, true)
doPlayerAddSkill(cid, SKILL__MAGLEVEL, 1, true)

And the other one is the same but 10 times.
 
Back
Top