Author Topic: Can't modify commandToServer().  (Read 6640 times)

Guys, for some reason I can't modify commandToServer(). I could do it yesterday, but today nothing can change it.

I removed my add-ons folder from Blockland and restarted but I still can't change it.
I even entered this in the console and nothing happened to it:

function commandToServer(){}

Maybe Badspot made it unmmodable for us?

This is an engine function. You cannot overwrite it.

No, you couldn't do it yesterday because it's not possible. Why on EARTH would you want to modify this function? It's literally imperative that it's not changed in order for the game to function at all.

What use could you have from killing commandToServer?

Oh I guess I never did modify it. I carelessly thought it worked because I was modifying it to clear old data I had saved from the server so that I didn't have to script a search function, and it looked like it worked at a glance. :s

I had it in a package, so I wasn't sure if it was my package or if the function simply was not modifiable for me. Attempting to rewrite it to doing nothing told me whether if it's that I couldn't modify the function.

But if it was modifiable, and if you just put in parent::commandToServer() and maybe even an echo(), the game will literally not work at all.

Or maybe I was exaggerating a little to make look dumb.
« Last Edit: June 18, 2014, 01:06:49 PM by SpeedBlade »

Either way if you try to package it, it will pretend that the function you packaged isn't there. I will even warn you when you exec it that it fails to overwrite or something like that.

Why are you trying to mod it?


As shown above, it is impossible to overwrite the engine function CommandToServer. Unlike functions like GameConnection::OnConnect, you dont get an error when you try to overwrite commandtoserver

If it doesn't overwrite it, it's not you, it is just not allowing you to do it.

It's not that you aren't "allowed" to change it. The name "commandToServer" is assigned to a function exposed from the engine. It doesn't technically exist on the TorqueScript side. Functions exposed from the engine take priority over normal functions however, so if you do define it, it'll find the engine function first.

It's not that you aren't "allowed" to change it. The name "commandToServer" is assigned to a function exposed from the engine. It doesn't technically exist on the TorqueScript side. Functions exposed from the engine take priority over normal functions however, so if you do define it, it'll find the engine function first.

So any cpp functions defined using ConsoleFunction() cannot be overwritten?

So any cpp functions defined using ConsoleFunction() cannot be overwritten?
True. Also, there's a big list of functions badspot blocked us from overwriting because he didn't want idiots to abuse them.

Code: [Select]
setAllocs_Schedules
setAllocs_Misc
setAllocs_Projectile
setAllocs_Item
setAllocs_Environment
setAllocs_Player
setAllocs_Vehicle
getAllocs_Schedules
killObjects
getGroup
schedule
getType
setHasAuthedOnce
getHasAuthedOnce
setJoinPassword
setPlayerName
getPlayerName
setBLID
getBLID
getAddress
isLocalConnection
isLocal
isLan
getRawIP
getControllingClient
getControllingObject
setShapeName
getShapeName
isBasePlate
isPlanted
isDead
isFakeDead
getFakeDeadTime
getDistanceFromGround
hasPathToGround
hasFakePathToGround
willCauseChainKill
VCEClientHTTP::fetchManual
serializeEventToString
GameConnection::TransmitExtendedBrickInfo
SimObject::serializeEventToString
GameModeGuiServer::ParseGameModeFile
authTCPobj_Client::onConnected
authTCPobj_Client::onLine
authTCPobj_Server::onConnected
authTCPobj_Server::onLine
mainMenuGui::onWake
postServerTCPObj::onConnected
postServerTCPObj::onLine
GameConnection::onConnect
GameConnection::authCheck
serverCmdRequestEventTables
ServerCmdRequestExtendedBrickInfo
ServerCmdCancelExtendedBrickInfoRequest
ServerCmdRequestWrenchEvents
ServerCmdRequestNamedTargets
auth_Init_Client
auth_Init_Server
WebCom_PostServer
appendCrapOnCache
dedicatedKeyCheck
dedicatedKeyPrompt
setKey
forceRequiredAddOn
loadRequiredAddOn
getLineCount
isListenServer

True. Also, there's a big list of functions badspot blocked us from overwriting because he didn't want idiots to abuse them.

~~
Why is willCauseChainKill disabled? It seems useful for game modes, not abusable.

Why is willCauseChainKill disabled? It seems useful for game modes, not abusable.
dunno, you can ask badspot if you want