The online racing simulator
with this version, you give me lot of works
So I have no chance.
When I want to use !rank I have this



Lapper Instance 127.0.0.1/30003 abort!

Column does not exist.
Mono.Data.SqliteClient
at Mono.Data.SqliteClient.SqliteDataReader.GetOrdinal (System.String name) [0x00000]
at LFSDbs.storedDbs.GetTable (System.String key, Int32 from, System.String relativeToUserName, Int32 nbRead, System.String Filter, Boolean flagDesc) [0x00000]
at LFSLapper.LFSClient.TopStoredUser (Int32 UCID, System.String title, System.String key, System.String pusername, System.String pnickname, System.String pcmd, Boolean flagNear, Boolean flagDesc) [0x00000]
at LFSLapper.LFSClient.execCmd (GLScript.unionVal val, System.Collections.ArrayList args, LFSLapper.infoPlayer currInfoPlayer) [0x00000]
at LFSLapper.LFSClient.myFunctions (GLScript.unionVal val, System.Collections.ArrayList args) [0x00000]
at GLScript.GLApp.parseBackcall (GLScript.SetOfVars GVAR, GLScript.SetOfVars LVAR, GLScript.unionVal val, System.Collections.ArrayList args) [0x00000]
at GLScript.Parseur.getval (GLScript.SetOfVars GVAR, GLScript.SetOfVars LVAR, GLScript.executeParsedFunction BC) [0x00000]
at GLScript.GLApp.retrieveEvalVar (System.String funcName, GLScript.TokenParse tkparse, GLScript.TokenBuffer currTokenBuffer, GLScript.SetOfVars GVAR, GLScript.SetOfVars LVAR, Boolean breakFunc, System.Char& breakCar) [0x00000]
Int32 GetOrdinal(System.String)
Closing Instance...


Any idea?

[edit]
When the db is empty I do not have the error as soon there is one entry, it dumps.

there is the extrac of one line:
1,ps_points_total,driver1,^4PLFS^7-^1driver1,PLFS-driver1,1,

[edit 2]
It comes from call to nextuser and topuser function, getting the value works.
Attached files
LFSLapper.rar - 16.7 KB - 204 views
Quote from loconstant :So I have no chance.
When I want to use !rank I have this



Lapper Instance 127.0.0.1/30003 abort!

Column does not exist.
Mono.Data.SqliteClient
at Mono.Data.SqliteClient.SqliteDataReader.GetOrdinal (System.String name) [0x00000]
at LFSDbs.storedDbs.GetTable (System.String key, Int32 from, System.String relativeToUserName, Int32 nbRead, System.String Filter, Boolean flagDesc) [0x00000]
at LFSLapper.LFSClient.TopStoredUser (Int32 UCID, System.String title, System.String key, System.String pusername, System.String pnickname, System.String pcmd, Boolean flagNear, Boolean flagDesc) [0x00000]
at LFSLapper.LFSClient.execCmd (GLScript.unionVal val, System.Collections.ArrayList args, LFSLapper.infoPlayer currInfoPlayer) [0x00000]
at LFSLapper.LFSClient.myFunctions (GLScript.unionVal val, System.Collections.ArrayList args) [0x00000]
at GLScript.GLApp.parseBackcall (GLScript.SetOfVars GVAR, GLScript.SetOfVars LVAR, GLScript.unionVal val, System.Collections.ArrayList args) [0x00000]
at GLScript.Parseur.getval (GLScript.SetOfVars GVAR, GLScript.SetOfVars LVAR, GLScript.executeParsedFunction BC) [0x00000]
at GLScript.GLApp.retrieveEvalVar (System.String funcName, GLScript.TokenParse tkparse, GLScript.TokenBuffer currTokenBuffer, GLScript.SetOfVars GVAR, GLScript.SetOfVars LVAR, Boolean breakFunc, System.Char& breakCar) [0x00000]
Int32 GetOrdinal(System.String)
Closing Instance...


Any idea?

[edit]
When the db is empty I do not have the error as soon there is one entry, it dumps.

there is the extrac of one line:
1,ps_points_total,driver1,^4PLFS^7-^1driver1,PLFS-driver1,1,

[edit 2]
It comes from call to nextuser and topuser function, getting the value works.

Hi Loco,

I tested you lpr file but its works ok here.
Ouch this is not good for me.

I will try with a fresh new lapper install

Thanks:
does it work now to me looks like a problem with ur sqlite file
Hello Tim,

I exchanged the SQLLite and Mono .dll and i still have the same issue.
Should I delete the storedvalue.dbs?

Thanks

[edit] Same result -> dump
Quote from loconstant :Hello Tim,

I exchanged the SQLLite and Mono .dll and i still have the same issue.
Should I delete the storedvalue.dbs?

Thanks

Hi,
You can try it with a clean install of lapper , in a new folder.(With a new storedvalue.dbs)

I tested your lpr file with a clean install. Only put your username in admin.txt and superuser.txt and change the admin pwd in default_1.ini

I have maked a new lpr file with the default file from 5.846.
Attached files
LFSLapper.zip - 17.4 KB - 199 views
Thanks Tim.

I tried with complete fresh install, and your modified lpr, same result

I must have an issue with SQLLite and my Linux server installation.

Gai: if your around here, may you have a look to it?

Fred
Hello,

Issue solved.
Gai-Luron provided me a new LFS Lapper dev version, which resolves it.

Thanks all for your help.
hi well for ur first version it dont look like it is adding the stuff to the database cause when u do !points its blank

it used to work now it dont
Hi Tim,

Quote from Tim NL :
I dont want money , but here is a point system for 12 players if you want more its not so hard to expand.

Am trying this one, but am puzzled with something.
Yesterday a player that came in first, was disqualified (DT).
That appeared to be messing up the assigned point to the players that had a normal finish. Any idea what may be causing this, or how I could solve this easily?

<edit> In the meantime I found this might be partly caused by not using the $flagConfirm when determining the ps_race_points. However I think this disqualified player will still be in the Finished Positions. Could that be solved by spectating the guy/gal in the OnFinish event? <endedit>
Quote from YamaSuba.NL :Hi Tim,



Am trying this one, but am puzzled with something.
Yesterday a player that came in first, was disqualified (DT).
That appeared to be messing up the assigned point to the players that had a normal finish. Any idea what may be causing this, or how I could solve this easily?

<edit> In the meantime I found this might be partly caused by not using the $flagConfirm when determining the ps_race_points. However I think this disqualified player will still be in the Finished Positions. Could that be solved by spectating the guy/gal in the OnFinish event? <endedit>

Hi,

You have to use the Event Onresult.

And to be sure that who won is the winner , you can use the $flagConfirm

1. Event OnResult now receive the confirm flags
CONF_MENTIONED 1
CONF_CONFIRMED 2
CONF_PENALTY_DT 4
CONF_PENALTY_SG 8
CONF_PENALTY_30 16
CONF_PENALTY_45 32
CONF_DID_NOT_PIT 64



Event OnResult( $userName,$flagConfirm ) # Player event

SWITCH( GetCurrentPlayerVar("FinishedPos") )
CASE 1:
IF( $flagConfirm == 2 || $flagConfirm == 18 || $flagConfirm == 34 )
THEN
show and give points

I am fairly new to LFS/Lapper/programming so please don't laugh too hard.

I have got LFSLapper 6.0.11 working ok and I am trying to add Tims point system.
I have tried adding the whole pointsystem.lpr code to the end of the LFSLapper.lpr file = did not work
I have tried adding the pieces of code in pointsystem.lpr to the relevant sections in LFSLapper.lpr = did not work.

Could some kind soul "point" me in the right direction?
Quote from Austin Hedley :I am fairly new to LFS/Lapper/programming so please don't laugh too hard.

I have got LFSLapper 6.0.11 working ok and I am trying to add Tims point system.
I have tried adding the whole pointsystem.lpr code to the end of the LFSLapper.lpr file = did not work
I have tried adding the pieces of code in pointsystem.lpr to the relevant sections in LFSLapper.lpr = did not work.

Could some kind soul "point" me in the right direction?

Download Tim's lapper script from post #32 above, open it, and search for the word point.

Everything to do with points should be copied from Tim's lapper and pasted into your own at the correct section.

For instance, in the Event OnLapperStart() section, you'll see

GlobalVar $point_L ;
GlobalVar $point_T ;
GlobalVar $ps_max_points;
$point_L = 75 ;
$point_T = 5 ;
$ps_max_points=10;

Copy all that and add to your code in same section.

You'll also need to copy everything to do with points from the Event OnMSO( $text ) section, the Event OnRaceStart( $NumP ) section, the Event OnQualStart( $NumP ) section, and the Event OnResult( $flagConfirm ) section.

Then in the Lang "EN" section, look for the lines that start built_, and add built_points = "Points";

=======================================================

You could also download PSPad (fancy Notepad text editor), look for Tim's guide on how to install, etc (look http://www.lfsforum.net/showthread.php?t=59967) and compare your lapper to Tim's and see where the differences are (open your lapper file, go to TOOLS, then look for Text Differences, then Text Diff with this file, and choose Tim's lapper).
Thank you sinanju, I now have points showing at the end of each race. I was so close before your help, but not close enough

Question: Should these points be accumulating with each race?
If not, any idea how to go about that?
Look at Tim's post #8 in this topic.
Quote from Austin Hedley :Thank you sinanju, I now have points showing at the end of each race. I was so close before your help, but not close enough

Question: Should these points be accumulating with each race?
If not, any idea how to go about that?

Hey,

All points are stored in the database.
Total points = total points + race points

You can Type !point to see the top 18 in your database.
Or type !rank to see your points.
Tim's system is very good, used an edited version for a beta of my GTR Multiclass Racing server (now defunct due to lack of LFS)
Hmm, I may have done something wrong because I dont get a list when typing !point or !rank.
Any chance someone could browse through my file and show me what I am doing wrong?
Attached files
LFSLapper.rar - 19.9 KB - 180 views
You're using newer version of lapper than I am, so guessing may have been basic changes in lapper coding that make part of Tim's code not work.

You could try replacing

IF(( $flagConfirm == 2 )||( $flagConfirm == 18 )||( $flagConfirm == 34 ))

with

IF( $flagConfirm == 2 || $flagConfirm == 18 || $flagConfirm == 34 )
A BIG Thankyou to everyone trying to help me out here,
Sinanju, after changing those lines I still see individual race points at the end of each race, but no total points, and alas no reaction from !point !points or !rank.
Thanks for the tip about using PSPad I have found it very useful, I would like to add PRGrep as a good text searching tool that handles alot of different filetypes.
Maybe I need to go back a revision with LFSLapper, what ver are you using?
I'm using version 5.926b (it's what 500Servers - my LFS Host company - uses as most up to date lapper).

I'm currently at work just now, and on secret broadband (normally we have to go thru network and some things like this are logged and not liked!) I've tried to download latest version of lapper, but I get error when I try.

Using an even older version of lapper (v5.924) which I have loaded along with LFS on my secret laptop (which unfortunately has no means to add data via disks or usb - as it has none), which connects to secret broadband, I've checked and the info stored in the storedvalue.dbs holds the proper points totals.

See screendump image.

Make sure that if your lapper text says !points that you use exactly same case of letters when inputting text in LFS. If you have !points in lapper, but you use !POINTS in LFS, you'll get nothing.

What I tend to do, is put different lower and upper case letters in separate CASE statements so that it doesn't matter if you use upper or lower case. For instance;

Quote : CASE "!point":
CASE "!POINT":
CASE "!points":
CASE "!POINTS":
CASE "!rank":
CASE "!RANK":
CASE "!DADDY:
topUser( "^1P^0oints ^1S^0ystem","ps_points_total","DESC",argv );
BREAK;

I have newer version of lapper on a disk somewhere at work - if I can find it, I'll load it here from my proper work pc (hopefully will be allowed), then download from here, then try it from secret pc.
Attached images
Tims Points System on Sinrs LFS Server.PNG
Attached files
LFSLapper6.011.zip - 1.9 MB - 219 views
As an update I have installed SQL Manager for firefox and the storedvalue.dbs is collecting the points ok.
Have implemented your CASE suggestions and I have included my up to date LFSLapper.lpr file
Attached files
LFSLapper.rar - 19.9 KB - 169 views
Quote from Austin Hedley :Hmm, I may have done something wrong because I dont get a list when typing !point or !rank.
Any chance someone could browse through my file and show me what I am doing wrong?

Eventually found the problem - you'd copied almost the whole SWITCH ($command) section to another part of lapper, so you had 2 of most commands. Search for something like !zone - you'll see what I mean. Unfortunately, you only had the !point command in one of these sections, so it was ignored.

I've made new lapper file with Tim's points system added in - try that - it worked for me.

If it does work- welcome to the world of LFSLapper!
Attached files
LFSLapper lapper file with Tims Point System added.rar - 18.3 KB - 203 views
Thanks for that sinanju, I see where I went wrong now.
The warning we witnessed on the test server was (id_main_careful not found), as it doesnt seem to apply to anything else in the script I simply removed it. All seems well.

FGED GREDG RDFGDR GSFDG