Jump to content

Problem with 'restartResource()'


FSXTim

Recommended Posts

Hello,

the resource "playerlist" doesn't restart, if somebody join the game.

Error: Bad argument @ 'restartResource'

function join () 
    local jPlayer = getPlayerName (source) 
    outputChatBox("|INFO| #6495ED"..jPlayer.." #FFFFFFhat German Blue Race betreten.", getRootElement(), 255, 255, 255, true) 
    restartResource(playerlist)      
end 
addEventHandler("onPlayerJoin", getRootElement(), join) 

Greets

Link to comment
  • Other Languages Moderators
Hello,

the resource "playerlist" doesn't restart, if somebody join the game.

Error: Bad argument @ 'restartResource'

function join () 
    local jPlayer = getPlayerName (source) 
    outputChatBox("|INFO| #6495ED"..jPlayer.." #FFFFFFhat German Blue Race betreten.", getRootElement(), 255, 255, 255, true) 
    restartResource(playerlist)      
end 
addEventHandler("onPlayerJoin", getRootElement(), join) 

Greets

Variable playerList is defined? I think no.

Well i understand, you want restart resource 'playerList' ?

function join () 
    local jPlayer = getPlayerName ( source ) 
    outputChatBox( "|INFO| #6495ED"..jPlayer.." #FFFFFFhat German Blue Race betreten.", root, 255, 255, 255, true ) 
    restartResource( getResourceFromName( 'playerList' ) )      
end 
addEventHandler("onPlayerJoin", root, join ) 

Link to comment

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...