boby psaico
Member
- Joined
- Oct 17, 2009
- Messages
- 84
- Reaction score
- 5
Well, someone knows tell me why the script reads a var from another script?
Example:
This script, called Obujos.lua:
And this, called Jaul.lua
What happens is that when i kill Jaul, the script Jaul.lua reads the var BOSS_GLOBAL_STORAGE from both scripts, and then changes both (80509 and 80510) to 1
Why this is happening?
Example:
This script, called Obujos.lua:
Code:
local BOSS_GLOBAL_STORAGE = 80510
local BOSS = "Obujos"
function onKill(cid, target)
if getCreatureName(target) == BOSS then
if(getGlobalStorageValue(BOSS_GLOBAL_STORAGE) < 1) then
setGlobalStorageValue(BOSS_GLOBAL_STORAGE, 1)
end
end
return true
end
And this, called Jaul.lua
Code:
local BOSS_GLOBAL_STORAGE = 80509
local BOSS = "Jaul"
function onKill(cid, target)
if getCreatureName(target) == BOSS then
if(getGlobalStorageValue(BOSS_GLOBAL_STORAGE) < 1) then
setGlobalStorageValue(BOSS_GLOBAL_STORAGE, 1)
end
end
return true
end
What happens is that when i kill Jaul, the script Jaul.lua reads the var BOSS_GLOBAL_STORAGE from both scripts, and then changes both (80509 and 80510) to 1
Why this is happening?