hi,
i try to learn lua and write plugins
now i have the first question:
i use this function:
And get this error:
but i have no idea why?
The API-doc says:

Can anyone help me? 
	
	
	
	
	
i try to learn lua and write plugins
now i have the first question:
i use this function:
function OnPlayerRightClick(Player)
	local Welt = cRoot:GetWorld("world")
	Player:SendMessage(Welt:GetName())
end
And get this error:
Code:
Warn [10:15:58] LUA: Plugins/test2/main.lua:46: error in function 'GetWorld'.
 argument #1 is 'class cRoot'; 'cRoot' expected.
Warn [10:15:58] Stack trace:
Warn [10:15:58]   [C](-1): GetWorld
Warn [10:15:58]   Plugins/test2/main.lua(46): (no name)
Warn [10:15:58] Stack trace end
Warn [10:15:58] Error in plugin test2 calling function <callback>()but i have no idea why?
The API-doc says:
Quote:Returns the cWorld object of the given world. It returns nil if there is no world with the given name.Did the "WorldName" mean not a string? Or whats wrong with me?

Can anyone help me?
 
	
 

 



