ply:SetJumpPower not working.

Hi,

I’m trying to set up a script on my Deathrun gamemode that I’m building, which should set the jump power of a player when they spawn.

from init.lua



function GM:PlayerSpawn( ply )
        local jumpBoost = sql.QueryValue("SELECT JUMP FROM player_info WHERE unique_id = '"..ply:SteamID().."'")

        if (jumpBoost == 2) then
            ply:SetJumpPower(250)
        elseif (jumpBoost == 1) then
            ply:SetJumpPower(225)
        else 
            ply:SetJumpPower(200)
        end
end


As you can see, a local variable jumpBoost is retrieved from the SQLite database.
I tested the query with a SQLite database browser (executed the query), and the value 2 was returned, so the sql query is correct.

I also tried putting the 2 in quotation marks (" "), but to no avail.

I tried numerous things, but I just can’t get this jump power to work!

If anyone could point me in the right direction (wrong function, wrong application, wrong everything), would be helpful.
I get the feeling I’m using it in the wrong way or something like that.

Thanks.

[editline]13th July 2012[/editline]

UPDATE

Mysteriously, It started working when I updated other things in the gamemode, so it could have been a saving issue.

No more need to reply.