Jump to content
  • 0

3bugs


karlis

Question

Posted

hi, i got 3 bugs.since i dont want to flood forum i made only 1topic for they, so here they are:

1)2 my friends reported that when they connect my server they geting folowing error:

''Download error: Couldn't resolve host name.'' since server name is just ''mapping'' i cant get the problerm

2)resource ''stinger'' spams messages, i get about 30messages per pressing

3)[15:50:27] WARNING: admin_commands.lua: Bad argument @ 'getPlayerFromName' - Line: 14

[15:50:27] ERROR: ...deathmatch/resources/admin/server/admin_commands.lua:17: attempt to index local 'string' (a nil value)

18 answers to this question

Recommended Posts

  • 0
Posted

hi, i got 3 bugs.since i dont want to flood forum i made only 1topic for they, so here they are:

1)2 my friends reported that when they connect my server they geting folowing error:

''Download error: Couldn't resolve host name.'' since server name is just ''mapping'' i cant get the problerm

2)resource ''stinger'' spams messages, i get about 30messages per pressing

3)[15:50:27] WARNING: admin_commands.lua: Bad argument @ 'getPlayerFromName' - Line: 14

[15:50:27] ERROR: ...deathmatch/resources/admin/server/admin_commands.lua:17: attempt to index local 'string' (a nil value)

  • 0
Posted

That "error" (actually a warning) is because the stinger resource uses a command name identical to one the admin resource uses. The errors are coming from the admin resource, because it's not receiving the expected arguments from the command. It's nothing to worry about.

Your first issue sounds like a port forwarding issue. Did you remember to forward the HTTP port as well as the server port? (Default is 22005)

  • 0
Posted

That "error" (actually a warning) is because the stinger resource uses a command name identical to one the admin resource uses. The errors are coming from the admin resource, because it's not receiving the expected arguments from the command. It's nothing to worry about.

Your first issue sounds like a port forwarding issue. Did you remember to forward the HTTP port as well as the server port? (Default is 22005)

  • 0
Posted

Yes.

List of command strings the admin resource uses (so avoid these to prevent it throwing warnings):

<player>
   <command handler="kick" call="kick" args="P,s" />
   <command handler="ban" call="ban" args="P,s" />
   <command handler="shout" call="shout" args="P,s" />
   <command handler="freeze" call="freeze" args="P" />
   <command handler="unfreeze" call="freeze" args="P" />
   <command handler="mute" call="mute" args="P" />
   <command handler="unmute" call="mute" args="P" />
   <command handler="sethealth" call="sethealth" args="P,i" />
   <command handler="sethp" call="sethealth" args="P,i" />
   <command handler="setarmour" call="setarmour" args="P,i" />
   <command handler="setarmor" call="setarmour" args="P,i" />
   <command handler="setskin" call="setskin" args="P,i" />
   <command handler="setstat" call="setstat" args="P,i,i" />
   <command handler="setteam" call="setteam" args="P,T" />
   <command handler="setinterior" call="setinterior" args="P,i" />
   <command handler="setdimension" call="setdimension" args="P,i" />
   <command handler="jetpack" call="jetpack" args="P" />
   <command handler="givevehicle" call="givevehicle" args="P,i" />
   <command handler="giveweapon" call="giveweapon" args="P,i,i" />
   <command handler="slap" call="slap" args="P,i" />
   <command handler="warpto" call="warp" args="P" />
 </player>
 <team>
   <command handler="createteam" call="createteam" args="s,i,i,i" />
   <command handler="destroyteam" call="destroyteam" args="s,i,i,i" />
 </team>
 <vehicle>
   <command handler="repair" call="repair" args="P" />"
   <command handler="addupgrade" call="customize" args="P,t-" />
   <command handler="addupgrades" call="customize" args="P,t-" />
   <command handler="setpaintjob" call="setpaintjob" args="P,i" />
   <command handler="setcolor" call="setcolor" args="P,t-" />
   <command handler="blowvehicle" call="blow" args="P" />
   <command handler="destroyvehicle" call="destroyvehicle" args="P" />
 </vehicle>
 <server>
   <command handler="setgame" call="setgame" args="s-" />
   <command handler="setgametype" call="setgame" args="s-" />
   <command handler="setmap" call="setmap" args="s-" />
   <command handler="setmapname" call="setmap" args="s-" />
   <command handler="settime" call="settime" args="i,i" />
   <command handler="setwelcome" call="setwelcome" args="s-" />
   <command handler="setpassword" call="setpassword" args="s" />
   <command handler="setweather" call="setweather" args="i" />
   <command handler="blendweather" call="blendweather" args="i" />
   <command handler="setgamespeed" call="setgamespeed" args="i" />
   <command handler="setgravity" call="setgravity" args="i" />
 </server>
 <bans>
   <command handler="banip" call="banip" args="s" />
   <command handler="banserial" call="banserial" args="s" />
   <command handler="unbanip" call="unbanip" args="s" />
   <command handler="unbanserial" call="unbanserial" args="s" />
 </bans>

  • 0
Posted

dont find any:

local thePlayer = getLocalPlayer()
local theStingers = {}
local theColShapes = {}
 
function bindStingerKey()
bindKey( "x", "down", dropStinger ) -- bind the "x" key to the drop stinger function
end
 
addEventHandler( "onClientResourceStart", getRootElement(), bindStingerKey )
addEventHandler( "onClientPlayerJoin",  getRootElement(), bindStingerKey )
 
function dropStinger( key, keyPress )
if( isPlayerInVehicle( thePlayer ) ) then -- is the player in a car?
	if( isElement( theStingers[ thePlayer ] ) ) then 
		destroyElement( theStingers[ thePlayer ] )
		destroyElement( theColShapes[ thePlayer ] )
	end
	local theVehicle = getPlayerOccupiedVehicle( thePlayer ) -- get the player's car
	local x, y, z = getElementPosition( theVehicle ) -- get vehicle position
	local rx, ry, rz = getVehicleRotation( theVehicle ) -- get vehicle rotation
	local a = getPlayerRotation( thePlayer ) -- get player facing angle
 
	x = x + math.sin( math.rad(a) ) * 4
	y = y - math.cos( math.rad(a) ) * 4
	rz = rz + 90
 
	local groundZ = getGroundPosition( x, y, z )
	if( groundZ ~= z ) then z = groundZ + 0.2 end 
 
	theStingers[ thePlayer ] = createObject( 2899, x, y, z, 0, 0, rz ) -- create the stinger (2892)
	theColShapes[ thePlayer ] = createColRectangle( (x - 2.0), (y - 2.0), 4.0, 4.0 ) -- set a colshape to check when a car hits the stinger
	setElementData( theColShapes[ thePlayer ], "amistinger", "yesplz" ) -- set the colshape as a stinger colshape
	--outputChatBox( "You dropped a stinger!", thePlayer, 255, 0, 0, true ) -- output a chatbox message
else 
--	outputChatBox( "You have to be in a vehicle to drop a stinger!", thePlayer, 255, 0, 0, true ) 
end
end
 
function clientHitStinger( theElement, matchingDimension )
if( getElementType( theElement ) == "vehicle" and getElementData( source, "amistinger" ) == "yesplz" ) then 
	setVehicleWheelStates( theElement, 1, 1, 1, 1 ) 
end
-- if the element is a vehicle and the colshape is the stinger's colshape, pop the vehicles tires
end
 
addEventHandler( "onClientColShapeHit", getRootElement(), clientHitStinger )
 
function destroyStinger( player, seat )
if( isElement( theStingers[ player ] ) ) then
	destroyElement( theStingers[ player ] )
	destroyElement( theColShapes[ player ] )
end
end
 
addEventHandler( "onClientPlayerQuit", getRootElement(), destroyStinger )
addEventHandler( "onClientVehicleExit", getRootElement(), destroyStinger )

  • 0
Posted

dont find any:

local thePlayer = getLocalPlayer()local theStingers = {}local theColShapes = {} function bindStingerKey()	bindKey( "x", "down", dropStinger ) -- bind the "x" key to the drop stinger functionend addEventHandler( "onClientResourceStart", getRootElement(), bindStingerKey )addEventHandler( "onClientPlayerJoin",  getRootElement(), bindStingerKey ) function dropStinger( key, keyPress )	if( isPlayerInVehicle( thePlayer ) ) then -- is the player in a car?		if( isElement( theStingers[ thePlayer ] ) ) then 			destroyElement( theStingers[ thePlayer ] )			destroyElement( theColShapes[ thePlayer ] )		end		local theVehicle = getPlayerOccupiedVehicle( thePlayer ) -- get the player's car		local x, y, z = getElementPosition( theVehicle ) -- get vehicle position		local rx, ry, rz = getVehicleRotation( theVehicle ) -- get vehicle rotation		local a = getPlayerRotation( thePlayer ) -- get player facing angle 		x = x + math.sin( math.rad(a) ) * 4		y = y - math.cos( math.rad(a) ) * 4		rz = rz + 90 		local groundZ = getGroundPosition( x, y, z )		if( groundZ ~= z ) then z = groundZ + 0.2 end  		theStingers[ thePlayer ] = createObject( 2899, x, y, z, 0, 0, rz ) -- create the stinger (2892)		theColShapes[ thePlayer ] = createColRectangle( (x - 2.0), (y - 2.0), 4.0, 4.0 ) -- set a colshape to check when a car hits the stinger		setElementData( theColShapes[ thePlayer ], "amistinger", "yesplz" ) -- set the colshape as a stinger colshape		--outputChatBox( "You dropped a stinger!", thePlayer, 255, 0, 0, true ) -- output a chatbox message	else 	--	outputChatBox( "You have to be in a vehicle to drop a stinger!", thePlayer, 255, 0, 0, true ) 	endend function clientHitStinger( theElement, matchingDimension )	if( getElementType( theElement ) == "vehicle" and getElementData( source, "amistinger" ) == "yesplz" ) then 		setVehicleWheelStates( theElement, 1, 1, 1, 1 ) 	end	-- if the element is a vehicle and the colshape is the stinger's colshape, pop the vehicles tiresend addEventHandler( "onClientColShapeHit", getRootElement(), clientHitStinger ) function destroyStinger( player, seat )	if( isElement( theStingers[ player ] ) ) then		destroyElement( theStingers[ player ] )		destroyElement( theColShapes[ player ] )	endend addEventHandler( "onClientPlayerQuit", getRootElement(), destroyStinger )addEventHandler( "onClientVehicleExit", getRootElement(), destroyStinger )

  • 0
Posted

"error downloading requested files: Couldn't resolve host name."occurs again,

i didnt change any configs, and its same with default config too, what could be the problem?

  • 0
Posted

"error downloading requested files: Couldn't resolve host name."occurs again,

i didnt change any configs, and its same with default config too, what could be the problem?

  • 0
Posted
"error downloading requested files: Couldn't resolve host name."occurs again,

i didnt change any configs, and its same with default config too, what could be the problem?

did u make a httpport (forward) not only server port ? & check ur firewall settings i hope this fixing it :roll:

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...