i been trying to make a script that would make stop ppl from lvling once they reach a level X till they do a certain quest. did this below but i keep getting "attempt to compare number with nil"
i tryed that as well as this getPlayerStorageValue(cid, 9996) ~= 1 and this getPlayerStorageValue(cid, 9996) == NULL
with the == NULL i wouldnt get error message but it wouldnt do the script after
Code:
if(getPlayerStorageValue(cid, 9996) == -1 and newlevel >= 250) then
doCreatureSay(cid, "Congratulation on reaching this level. Go above Refugia depot to do the quest that you need to unlock further level.", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 9996, 1)
PlayerSetStorageValue(cid, queststorage, 1)
PlayerSetExperienceRate(cid, 0.0)
end
i tryed that as well as this getPlayerStorageValue(cid, 9996) ~= 1 and this getPlayerStorageValue(cid, 9996) == NULL
with the == NULL i wouldnt get error message but it wouldnt do the script after