Log in

View Full Version : weapons error popped up



frankpetrov
09-23-2011, 12:23 AM
I'm quite unsure if this has been posted before but I might as well do it anyway.
Started up my server, connected to it, i tried to pullout a weapon and the server crashed. I figured it was the weapon. So i restarted the server, went in-game, holstered a different weapon, tried to unholster it and the server crashed again. Just to make sure it wasn't weapons, I did it all again except the last time, i removed all armour and all weapons. even dropped them on the ground. I tried to hold up my fists to punch and it still crashed. now, everytime, it gave this error in the console. pardon the whitescreen blocking it.

Edit: Btw, not using the default saved game. attached is a copy of the saved game if you wanna test.https://www.fighttokill.info/gamephotos/serversave1.fos

https://www.fighttokill.info/gamephotos/vaultmp_error.png

foxtacles
09-23-2011, 01:50 PM
Can you show me the script you're running?

frankpetrov
09-23-2011, 02:31 PM
here it is.



#include <vaultmp>

/*forward MyTimer();

public MyTimer()
{

}*/

main()
{
printf("Script Test");
SetServerName("Script Testing");
SetServerRule("version", "script v0.3c");
SetServerRule("website", "vaultmp.com");

switch (GetGameCode())
{
case FALLOUT3:
SetServerMap("the wasteland");
case NEWVEGAS:
SetServerMap("mojave desert");
case OBLIVION:
SetServerMap("cyrodiil");
}

//CreateTimer("MyTimer", 5000);
}

public OnClientAuthenticate(const name{}, const pwd{})
{
return true;
}

public OnPlayerDisconnect(player, reason)
{
}

public OnPlayerRequestGame(player)
{
new base = 0x00000000;

switch (GetGameCode())
{
case FALLOUT3:
base = 0x00030D82; // Carter
case NEWVEGAS:
base = 0x0010C0BE; // Jessup
case OBLIVION:
base = 0x000A3166; // Achille
}

return base;
}

public OnSpawn(object)
{

}

public OnCellChange(object, cell)
{

}

public OnActorDeath(actor)
{

}

public OnActorValueChange(actor, index, Float:value)
{

}

public OnActorBaseValueChange(actor, index, Float:value)
{

}

/*public OnActorAlert(actor, Bool:alerted)
{
printf("alert: %d", alerted);
}

public OnActorSneak(actor, Bool:sneaking)
{
printf("sneaking: %d", sneaking);
}*/

foxtacles
09-23-2011, 03:28 PM
Try to uncomment OnActorAlert and OnActorSneak. All public callbacks must be existent; you can comment out the printf if you want, though ;)

frankpetrov
09-23-2011, 06:05 PM
Try to uncomment OnActorAlert and OnActorSneak. All public callbacks must be existent; you can comment out the printf if you want, though ;)

Worked. Thanks.

foxtacles
09-23-2011, 06:19 PM
I will make it optional to define the callbacks soon ;)

frankpetrov
09-23-2011, 06:39 PM
Little off topic: How can I pull up some sort of debug screen? I'm trying to find the coords of where the player is standing.

foxtacles
09-23-2011, 06:53 PM
Rather difficult because some important scripting functions are not implemented yet. If you just want to display your position in-game, you could use the Fallout command line (open with ^):


player.GetPos X
player.GetPos Y
player.GetPos Z

with the current implementation state of scripting functions you could do something like (PAWN):


new playerID = 0; // global because we can't loop through playerIDs yet

forward GetPos();

public GetPos()
{
if (playerID != 0)
{
new Float:x, Float:y, Float:z;
GetPos(playerID, x, y, z);
// now do something with x, y, z....you could use PAWN file functions or console, like so:
printf("Player with ID %d has coordinates X (%f), Y(%f), Z(%f)", playerID, x, y, z);
}
}

main()
{
// your main() code
CreateTimer("GetPos", 500); // execute the above GetPos code every 500ms
}

public OnPlayerRequestGame(player)
{
playerID = player;
// the rest of OnPlayerRequestGame is important here
}

public OnPlayerDisconnect(player, reason)
{
if (player == playerID) {
playerID = 0;
}
}