Author Topic: "Unable to Find Object" AGAIN  (Read 1687 times)

I named the package asdf, but in the console it refuses to execute because it hates A's.
Code: [Select]
activatepackage(##a##sdf);
What do?

Edit: This happens around the same spot for each name (the first letter, for example; ##g##rapefruit.)
[/s]

I'm an idiot.

Code: [Select]
//packaging, yo
package grapefruit
{
   function OnGameConnection::onClientEnterGame(%client)
   {
       %client.gold = 20;    
  }
}[b];[/b]
//end of packaging
activatepackage("grapefruit");

function getgold(%client)
{
%client.bottomPrint(%client.gold, 3);
}

The error is
Code: [Select]
Unable to find object: '' attempting to call function 'bottomPrint'I don't know the best way of getting the object, so I assumed I could assign a variable to the client.

I still want the variable to be client sided and kept on death.
« Last Edit: February 07, 2012, 07:56:01 AM by brickybob »

The problem is BEFORE this line.

post the code.
remember that packages go like
package name
{
};
activatepackage(name);

NOTICE THE ;.
If thats not there it will break. Also remember to have the right amount of closing brackets

The error is
Code: [Select]
Unable to find object: '' attempting to call function 'bottomPrint'I don't know the best way of getting the object, so I assumed I could assign a variable to the client.

I still want the variable to be client sided and kept on death.
Show us the code where you are calling getgold.

Show us the code where you are calling getgold.
Code: [Select]
[size=5pt]//-------------------------- 2/6/2012 -- 20:03:02 -----
Processor Init:
   AMD (unknown), ~2.85 Ghz
     (timed at roughly 2.83 Ghz)
   FPU detected
   MMX detected
   3DNow detected
   SSE detected
 
Math Init:
   Installing Standard C extensions
   Installing Assembly extensions
   Installing FPU extensions
   Installing MMX extensions
   Installing 3DNow extensions
   Installing SSE extensions
 
Input Init:
   keyboard0 input device created.
   mouse0 input device created.
   DirectInput enabled.

--------- Loading MODS ---------
Loading compiled script common/main.cs.
Missing file: common/defaults.cs!
Loading compiled script fps/main.cs.
Loading compiled script fps/client/defaults.cs.
Loading compiled script fps/server/defaults.cs.
Compiling fps/client/prefs.cs...
Loading compiled script fps/client/prefs.cs.
Compiling fps/server/prefs.cs...
Loading compiled script fps/server/prefs.cs.

--------- Parsing Arguments ---------

--------- Initializing MOD: Common ---------
Loading compiled script common/client/canvas.cs.
Loading compiled script common/client/audio.cs.

--------- Initializing MOD: FPS ---------
Loading compiled script fps/client/init.cs.
Loading compiled script fps/server/init.cs.
Loading compiled script fps/data/init.cs.
Missing file: fps/data/terrains/grassland/propertyMap.cs!
Missing file: fps/data/terrains/scorched/propertyMap.cs!
Compiling fps/server/ipBanList.cs...
Loading compiled script fps/server/ipBanList.cs.

--------- Initializing FPS: Server ---------
Loading compiled script common/server/audio.cs.
Loading compiled script common/server/server.cs.
Loading compiled script common/server/message.cs.
Loading compiled script common/server/commands.cs.
Loading compiled script common/server/missionInfo.cs.
Loading compiled script common/server/missionLoad.cs.
Loading compiled script common/server/missionDownload.cs.
Loading compiled script common/server/clientConnection.cs.
Loading compiled script common/server/kickban.cs.
Loading compiled script common/server/game.cs.
Loading compiled script fps/server/scripts/commands.cs.
Loading compiled script fps/server/scripts/centerPrint.cs.
Loading compiled script fps/server/scripts/game.cs.

--------- Initializing FPS: Client ---------
Loading compiled script common/client/message.cs.
Loading compiled script common/client/mission.cs.
Loading compiled script common/client/missionDownload.cs.
Loading compiled script common/client/actionMap.cs.
Loading compiled script common/editor/editor.cs.
Video Init:
   Accelerated OpenGL display device detected.
   Accelerated D3D device detected.
   Voodoo 2 display device not detected.

Activating the OpenGL display device...
Activating the OpenGL display device...
Setting screen mode to 640x480x32 (w)...
Creating a new window...
Acquiring a new device context...
Pixel format set:
  32 color bits, 24 depth bits, 8 stencil bits
Creating a new rendering context...
Making the new rendering context current...
OpenGL driver information:
  Vendor: ATI Technologies Inc.
  Renderer: ATI Radeon HD 4550   
  Version: 3.3.10750 Compatibility Profile Context
OpenGL Init: Enabled Extensions
  ARB_multitexture (Max Texture Units: 8)
  EXT_compiled_vertex_array
  EXT_texture_env_combine
  EXT_packed_pixels
  EXT_fog_coord
  ARB_texture_compression
  EXT_texture_compression_s3tc
  (ARB|EXT)_texture_env_add
  EXT_texture_filter_anisotropic (Max anisotropy: 16.000000)
  WGL_EXT_swap_control
OpenGL Init: Disabled Extensions
  EXT_paletted_texture
  NV_vertex_array_range
  3DFX_texture_compression_FXT1
  NPatch tessellation

Loading compiled script common/ui/defaultProfiles.cs.
Loading compiled script common/ui/GuiEditorGui.gui.
common/ui/GuiEditorGui.gui (0): Unable to instantiate non-conobject class GuiEditorRuler.
common/ui/GuiEditorGui.gui (0): Unable to instantiate non-conobject class GuiEditorRuler.
Loading compiled script common/ui/ConsoleDlg.gui.
Loading compiled script common/ui/InspectDlg.gui.
Loading compiled script common/ui/InspectAddFieldDlg.gui.
Loading compiled script common/ui/LoadFileDlg.gui.
Loading compiled script common/ui/SaveFileDlg.gui.
Loading compiled script common/ui/MessageBoxOkDlg.gui.
Loading compiled script common/ui/MessageBoxYesNoDlg.gui.
Loading compiled script common/ui/MessageBoxOKCancelDlg.gui.
Loading compiled script common/ui/MessagePopupDlg.gui.
Loading compiled script common/ui/HelpDlg.gui.
Loading compiled script common/ui/RecordingsDlg.gui.
Loading compiled script common/client/metrics.cs.
Loading compiled script common/ui/FrameOverlayGui.gui.
Loading compiled script common/client/messageBox.cs.
Loading compiled script common/client/screenshot.cs.
Loading compiled script common/client/cursor.cs.
Loading compiled script common/client/help.cs.
Loading compiled script common/client/recordings.cs.

OpenAL Driver Init:
OpenAL
   Vendor: Creative Labs Inc.
   Version: OpenAL 1.0
   Renderer: Software
   Extensions: EAX 2.0, EAX 3.0, EAX Unified, and EAX-AC3

Loading compiled script fps/client/scripts/audioProfiles.cs.
Loading compiled script fps/client/ui/defaultGameProfiles.cs.
Loading compiled script fps/client/ui/PlayGui.gui.
Loading compiled script fps/client/ui/ChatHud.gui.
Loading compiled script fps/client/ui/playerList.gui.
Loading compiled script fps/client/ui/mainMenuGui.gui.
Loading compiled script fps/client/ui/aboutDlg.gui.
Loading compiled script fps/client/ui/startMissionGui.gui.
Loading compiled script fps/client/ui/joinServerGui.gui.
Loading compiled script fps/client/ui/endGameGui.gui.
Loading compiled script fps/client/ui/loadingGui.gui.
Loading compiled script fps/client/ui/optionsDlg.gui.
Loading compiled script fps/client/ui/remapDlg.gui.
Loading compiled script fps/client/scripts/client.cs.
Loading compiled script fps/client/scripts/missionDownload.cs.
Loading compiled script fps/client/scripts/serverConnection.cs.
Loading compiled script fps/client/scripts/playerList.cs.
Loading compiled script fps/client/scripts/loadingGui.cs.
Loading compiled script fps/client/scripts/optionsDlg.cs.
Loading compiled script fps/client/scripts/chatHud.cs.
Loading compiled script fps/client/scripts/messageHud.cs.
Loading compiled script fps/client/scripts/playGui.cs.
Loading compiled script fps/client/scripts/centerPrint.cs.
Loading compiled script fps/client/scripts/game.cs.
Loading compiled script fps/client/scripts/msgCallbacks.cs.
Loading compiled script fps/client/scripts/startMissionGui.cs.
Loading compiled script fps/client/scripts/default.bind.cs.
Compiling fps/client/config.cs...
Loading compiled script fps/client/config.cs.
Loading compiled script fps/client/ui/adminGui.gui.
Loading compiled script fps/client/scripts/adminGui.cs.
Binding server port to default IP
UDP initialized on port 0
Engine initialized...
Exporting server prefs...
Starting multiplayer mode
Binding server port to default IP
UDP initialized on port 28000
Loading compiled script fps/server/scripts/constants.cs.
Loading compiled script fps/server/scripts/serverCmd.cs.
Loading compiled script fps/server/scripts/audioProfiles.cs.
Loading compiled script fps/server/scripts/camera.cs.
Loading compiled script fps/server/scripts/markers.cs.
... Shape with old version.
Loading compiled script fps/server/scripts/triggers.cs.
Loading compiled script fps/server/scripts/inventory.cs.
Loading compiled script fps/server/scripts/shapeBase.cs.
Loading compiled script fps/server/scripts/item.cs.
Loading compiled script fps/server/scripts/staticShape.cs.
Loading compiled script fps/server/scripts/weapon.cs.
Loading compiled script fps/server/scripts/radiusDamage.cs.
Loading compiled script fps/server/scripts/player.cs.
Loading compiled script fps/data/shapes/player/player.cs.
Object 'bluePaintExplosionEmitter' is not a member of the 'ParticleEmitterData' data block class
Loading compiled script fps/server/scripts/aiPlayer.cs.
Loading compiled script fps/server/scripts/hammer.cs.
Loading compiled script fps/server/scripts/bow.cs.
Loading compiled script fps/server/scripts/spear.cs.
Loading compiled script fps/server/scripts/sword.cs.
Loading compiled script fps/server/scripts/axe.cs.
Missing file: fps/server/scripts/wrench.cs!
Loading compiled script fps/server/scripts/wand.cs.
Loading compiled script fps/server/scripts/plateMail.cs.
Loading compiled script fps/server/scripts/pointyHelmet.cs.
Loading compiled script fps/server/scripts/helmet.cs.
Loading compiled script fps/server/scripts/visor.cs.
Loading compiled script fps/server/scripts/quiver.cs.
Loading compiled script fps/server/scripts/pack.cs.
Loading compiled script fps/server/scripts/airtank.cs.
Loading compiled script fps/server/scripts/ski.cs.
Loading compiled script fps/server/scripts/shield.cs.
Loading compiled script fps/server/scripts/scoutHat.cs.
Loading compiled script fps/server/scripts/bucketPack.cs.
Loading compiled script fps/server/scripts/triPlume.cs.
Loading compiled script fps/server/scripts/goblet.cs.
Loading compiled script fps/server/scripts/cape.cs.
Loading compiled script fps/server/scripts/sprayCan.cs.
ParticleEmitterData(bluePaintTrailEmitter) periodVariance >= period
Loading compiled script fps/server/scripts/brick.cs.
Loading compiled script fps/server/scripts/baseplate.cs.
Loading compiled script fps/server/scripts/brick2x2.cs.
Loading compiled script fps/server/scripts/brick2x4.cs.
Warning: shape fps/data/shapes/bricks/brick2x4.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/brick2x4.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Loading compiled script fps/server/scripts/brick1x1.cs.
Warning: shape fps/data/shapes/bricks/brick1x1.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/brick1x1.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Loading compiled script fps/server/scripts/brick1x2.cs.
Warning: shape fps/data/shapes/bricks/brick1x2.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/brick1x2.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Loading compiled script fps/server/scripts/brick1x4.cs.
Warning: shape fps/data/shapes/bricks/brick1x4.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/brick1x4.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Loading compiled script fps/server/scripts/brick1x4x5window.cs.
Warning: shape fps/data/shapes/bricks/brick1x4x5window.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/brick1x4x5window.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Loading compiled script fps/server/scripts/plate1x1.cs.
Warning: shape fps/data/shapes/bricks/plate1x1.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x1.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Loading compiled script fps/server/scripts/plate1x2.cs.
Warning: shape fps/data/shapes/bricks/plate1x2.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x2.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Loading compiled script fps/server/scripts/plate1x4.cs.
Warning: shape fps/data/shapes/bricks/plate1x4.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x4.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Loading compiled script fps/server/scripts/plate1x6.cs.
Warning: shape fps/data/shapes/bricks/plate1x6.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x6.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Loading compiled script fps/server/scripts/plate1x8.cs.
Warning: shape fps/data/shapes/bricks/plate1x8.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x8.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Loading compiled script fps/server/scripts/plate1x10.cs.
Warning: shape fps/data/shapes/bricks/plate1x10.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x10.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Loading compiled script fps/server/scripts/plate2x4.cs.
Warning: shape fps/data/shapes/bricks/plate2x4.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate2x4.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Loading compiled script fps/server/scripts/plate6x12.cs.
Warning: shape fps/data/shapes/bricks/plate6x12.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate6x12.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Loading compiled script fps/server/scripts/specialVehicles.cs.
Object 'tireEmitter' is not a member of the 'ParticleEmitterData' data block class
addthread empty
addthread empty
Loading compiled script fps/server/scripts/precipitation.cs.
Loading compiled script fps/server/scripts/car.cs.
Loading compiled script fps/server/scripts/showImages.cs.
Compiling fps/server/scripts/Addons/rpg.cs...
Loading compiled script fps/server/scripts/Addons/rpg.cs.
*** LOADING MISSION: fps/data/missions/bedroom.mis
*** Stage 1 load
*** Stage 2 load
Executing fps/data/missions/bedroom.mis.
*** Mission loaded
-----------CONN = 1518
Connect request from: IPX:6C650031:20312031006D:29793
checking banlist 0
checking banlist 1
checking banlist 2
Connection established 1518
CADD: 1519 local
*** Sending mission load to client: fps/data/missions/bedroom.mis
Mapping string: updatePrefs to index: 0
Mapping string: ServerMessage to index: 1
Mapping string: MsgConnectionError to index: 2
Mapping string: MsgLoadInfo to index: 3
Mapping string: MsgLoadDescripition to index: 4
Sending heartbeat to master server [IP:209.90.70.170:28002]
Mapping string: updatePrefs to index: 0
Mapping string: MsgLoadInfoDone to index: 5
Mapping string: MsgClientJoin to index: 6
Mapping string: Welcome to Blockland %1. to index: 7
Mapping string:  Blockhead to index: 8
Mapping string: MissionStartPhase1 to index: 9
*** New Mission: fps/data/missions/bedroom.mis
*** Phase 1: Download Datablocks & Targets
Mapping string:  to index: 10
Mapping string: MissionStartPhase1Ack to index: 1
Could not locate texture: fps/data/shapes/player/base.lmale
Could not locate texture: fps/data/shapes/player/base.lmale
Warning: shape fps/data/shapes/bricks/brick2x4.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/brick2x4.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/brick1x1.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/brick1x1.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/brick1x2.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/brick1x2.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/brick1x4.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/brick1x4.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/brick1x4x5window.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/brick1x4x5window.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x1.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x1.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x2.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x2.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x4.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x4.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x6.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x6.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x8.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x8.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x10.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate1x10.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate2x4.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate2x4.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate6x12.dts collision detail 0 (Collision-1) bounds exceed that of shape.
Warning: shape fps/data/shapes/bricks/plate6x12.dts collision detail 0 (Collision-1) bounds exceed that of shape.
addthread empty
addthread empty
Mapping string: MissionStartPhase2 to index: 11
*** Phase 2: Download Ghost Objects
Mapping string: MissionStartPhase2Ack to index: 2
Could not locate texture: fps/data/interiors/lego/ORIGIN
Could not locate texture: fps/data/interiors/lego/TRIGGER
Could not locate texture: fps/data/interiors/lego/FORCEFIELD
Ghost Always objects received.
Mapping string: MissionStartPhase3 to index: 12
Client Replication Startup has Happened!
fxFoliageReplicator - Client Foliage Replication Startup is complete.
*** Phase 3: Mission Lighting
 Successfully loaded mission lighting file: 'fps/data/missions/bedroom_f941e4f4.ml'
Mission lighting done
Mapping string: MissionStartPhase3Ack to index: 3
spawn object = 1453
Mapping string: MissionStart to index: 13
Mapping string: SyncClock to index: 14
Mapping string: MsgClearInv to index: 15
*** Initial Control Object
Activating DirectInput...
keyboard0 input device acquired.
Mapping string: graydark to index: 16
Mapping string: black to index: 17
Mapping string: red to index: 18
Mapping string: blue to index: 19
Mapping string: brown to index: 20
keyboard0 input device unacquired.
Received info request from a master server [IP:209.90.70.170:28002].
==>getgold();
fps/server/scripts/Addons/rpg.cs (0): Unable to find object: '' attempting to call function 'bottomPrint'
keyboard0 input device acquired.
keyboard0 input device unacquired.
==>quit();
Exporting client prefs
Exporting server prefs
Exporting IP banlist
Exporting client prefs
Exporting server prefs
fps/server/scripts/game.cs (297): Unable to find object: '1527' attempting to call function 'delete'
CDROP: 1519 IPX:6C650031:20312031006D:29793
Shutting down the OpenGL display device...
Making the GL rendering context not current...
Deleting the GL rendering context...
Releasing the device context...[/size]

Too many letters so no edit, also I'm using BL 0002 because I was trying to remakes spider's RPG.  Anyone remember that?

Another edit: I'll port it to retail when I get it done, maybe...
« Last Edit: February 06, 2012, 08:07:16 PM by brickybob »

I.. I don't know if this is just a huge oversight or what, but you're not providing a client for the %client variable. Of course it's not going to be able to find the object %client, you didn't give it an object to operate on.


I.. I don't know if this is just a huge oversight or what, but you're not providing a client for the %client variable. Of course it's not going to be able to find the object %client, you didn't give it an object to operate on.
I was under the assumption that it would automatically use the client that sent the command.

Parent:: is missing in package
Code: [Select]
package asdf
{
     function GameConnection::autoAdminCheck(%client)
     {
          %client.gold = 20;
          return parent::autoAdminCheck(%client);
     }
};
ActivatePackage(asdf);

function getGold(%client)
{
     if(isobject(%client))
     {
          commandToClient(%client, 'bottomPrint', "Gold: " @ %client.gold);
     }
     else
     {
          error("no client");
     }
}
Untested, typed on phone. To send the gold count, type:
getGold(findclientbyname(Name));
« Last Edit: February 07, 2012, 04:12:08 PM by Scout31 »

function GameConnection::autoAdminCheck

GameConnection is a namespace, not a keyword.

Whoops, sorry. Again, typed on my phone, and I really wasn't paying attention to that

Code: [Select]
function getgold(%client)
{
%client.bottomPrint(%client.gold, 3);
}
make function getgold be
function servercmdgetgold
if you want it as /getgold ingame.

make function getgold be
function servercmdgetgold
if you want it as /getgold ingame.
well
i know that

well
i know that
I was under the assumption that it would automatically use the client that sent the command.
Well, no. If it was a serverCmd that would be true. In it's current context, getGold is a serverside only function. If you want clients to be able to use it you must make a serverCmdGetGold. Otherwise you can run getGold(findClientByName("BrickyBob")); or some other way to get your client. It doesn't fill in non provided variables.