Skip to content
This repository has been archived by the owner on Nov 27, 2020. It is now read-only.

call back must be a function #713

Open
khaledatef2002 opened this issue May 16, 2018 · 2 comments
Open

call back must be a function #713

khaledatef2002 opened this issue May 16, 2018 · 2 comments

Comments

@khaledatef2002
Copy link

hello while iam tying to run the server from src/start.bat i have got erorr say callback must be a function

timers.js:379
    throw new ERR_INVALID_CALLBACK();
    ^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
    at setTimeout (timers.js:379:11)
    at GameServer.mainLoop (C:\Users\Administrator\Desktop\Ogar-master\src\GameServer.js:324:13)
    at ontimeout (timers.js:427:11)
    at tryOnTimeout (timers.js:289:5)
    at listOnTimeout (timers.js:252:5)
    at Timer.processTimers (timers.js:212:10)

C:\Users\Administrator\Desktop\Ogar-master\src>pause
Press any key to continue . . .
@Luka967
Copy link
Collaborator

Luka967 commented May 16, 2018

Ogar is very outdated. Use OgarII or MultiOgar-Edited instead.
Aside from it being outdated, you're probably using a newer version of node.js which broke Ogar.

@Faris90
Copy link

Faris90 commented Dec 12, 2018

Change https://github.com/OgarProject/Ogar/blob/master/src/GameServer.js#L205 to function connectionEstablished(ws, req) {
Change https://github.com/OgarProject/Ogar/blob/master/src/GameServer.js#L219 to var origin = req.headers.origin;
c) Change https://github.com/OgarProject/Ogar/blob/master/src/gameserver.ini#L28 to serverDiscardForeignClients = 0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants