Official SMOD2D Developer Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Official SMOD2D Developer Forum

We've moved FORUMS. Also, do remember that the MOD is dead but we're working on the REAL GAME NOW.
 
HomePortalLatest imagesSearchRegisterLog in

 

 smod.lua - unneeded coding.

Go down 
3 posters
AuthorMessage
wenn




Posts : 6
Join date : 2010-05-18

smod.lua - unneeded coding. Empty
PostSubject: smod.lua - unneeded coding.   smod.lua - unneeded coding. Icon_minitimeThu May 27, 2010 1:24 pm

if smod==nil then smod={} end

function initArray(m)
local array = {}

for i = 1, m
do array[i]=0
end

return array
end


@adware: These are the first codes in your lua, they seem useless - Do you need them or can I remove them.
Back to top Go down
Adware




Posts : 11
Join date : 2010-05-21

smod.lua - unneeded coding. Empty
PostSubject: Re: smod.lua - unneeded coding.   smod.lua - unneeded coding. Icon_minitimeThu May 27, 2010 1:30 pm

Oh sure, as long as the script works. You're better than me at lua.

I don't understand though, does cs2d have initArray already or there's another script running besides s-mod.lua?
Back to top Go down
Spyware
Project Administration Leader(your PAL)
Spyware


Posts : 256
Join date : 2010-05-17
Age : 113
Location : Marie Byrd Land, Antarctica

smod.lua - unneeded coding. Empty
PostSubject: Re: smod.lua - unneeded coding.   smod.lua - unneeded coding. Icon_minitimeThu May 27, 2010 1:39 pm

~MOVED TO SMOD REPORTS~
Back to top Go down
https://smod2d.forumotion.com
wenn




Posts : 6
Join date : 2010-05-18

smod.lua - unneeded coding. Empty
PostSubject: Re: smod.lua - unneeded coding.   smod.lua - unneeded coding. Icon_minitimeFri May 28, 2010 4:38 am

lua not cs2d, already have initArray() "{}"

smod.array = {} initializes nil values

http://www.lua.org/pil/11.1.html
Back to top Go down
Sponsored content





smod.lua - unneeded coding. Empty
PostSubject: Re: smod.lua - unneeded coding.   smod.lua - unneeded coding. Icon_minitime

Back to top Go down
 
smod.lua - unneeded coding.
Back to top 
Page 1 of 1
 Similar topics
-
» SMOD is *DEAD*?
» FIRST EVER SMOD OFFICIAL ART
» The SMOD:2D Team
» LaG SMOD 2D problem
» DC's Opinion on SMOD:2D

Permissions in this forum:You cannot reply to topics in this forum
Official SMOD2D Developer Forum :: SMOD2D Project Related :: SMOD2D Reports-
Jump to: