capitanazop Posted October 24, 2009 Share Posted October 24, 2009 hi i create a level system for a rpg mode and in this gamemode works great! and have the same errors but only in the start of mode and after dont have problems but with my gamemode against all, zombies script, and in another resource dont work and get many errors. function levelUp (dataName) local EXP = getElementData(source,"experience") if (EXP > 80 and EXP < 180) then outputChatBox("you are level 2 whit " .. tostring(EXP), source) -- output this message together with the money setElementData( source, "level", 2); else -- nothing : D end and the errors [11:43:20] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:21] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:22] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:22] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:22] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:22] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:22] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:22] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:23] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:23] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:23] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:24] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:24] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:25] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:25] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:25] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:26] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:26] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:26] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:26] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:26] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:26] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:26] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:27] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:27] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:27] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:27] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean [11:43:27] ERROR: ...dreas/server/mods/deathmatch/resources/level/lvl.lua:32: attempt to compare number with boolean the line 32 is: if (EXP > 80 and EXP < 180) then i have another comand for check my exp and in my rpg gamemode says te exp perfectly but here say only "false" any idea what is the problem? bye and sorry for the english Link to comment
Dark Dragon Posted October 24, 2009 Share Posted October 24, 2009 EXP having the value false could be caused by -source not existing at all -source's element data "experience" not being set yet and what is dataName, it seems unused? it would be pretty useful to know when your levelUp function is called, by what and client or server side EDIT: reading your post again it makes now even less sense? what does work? when does it work? does it work at all? you don't make your problem clear Link to comment
capitanazop Posted October 24, 2009 Author Share Posted October 24, 2009 i fix the "False" problem but the error of "compare number with boolean continues. the script work perfect, when you kill a zombie you EXP aument increase 5 and when got to 80 EXP you level Up. but the problem is the many errors. bye Link to comment
Dark Dragon Posted October 24, 2009 Share Posted October 24, 2009 and what is dataName, it seems unused? it would be pretty useful to know when your levelUp function is called, by what and client or server side Link to comment
capitanazop Posted October 25, 2009 Author Share Posted October 25, 2009 a friend help me and finally its work without errors function levelUp (dataName) local EXP = getElementData(source,"experiencia") if dataName == "experiencia" then if (EXP > 80 and EXP < 180 ) then outputChatBox("Eres Level 2 con " .. tostring(EXP), source) -- output this message together with the money setElementData( source, "level", 2); end Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now