ply:SetJumpPower not working.


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
        elseif (jumpBoost == 1) then

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.


[editline]13th July 2012[/editline]


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.