View Single Post
  #5  
Old 01-09-2011, 06:56 PM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Quote:
Originally Posted by callimuc View Post
ah ok i had the setlevel2("blabla",10,10); but without player.setlevel2("blabla",10,10); but it still wont wor, but i dont have any errors now






so do u mean i should make like:
PHP Code:
function onCreated() {
//blabla
  
Warp000();
}
function 
Warp000() {
//or function onWarp000() { i have seen this two what should i use
//blabla

No, not at all.

I mean like:

PHP Code:
function warpPlayer(levelxychatText)
{
  
setlevel2(levelxy);
  
player.dir 2;
  
  if (
chatText != null)
    
player.chat chatText;
  else
    
player.chat "Warped";

This way, if you wanted to change the direction for all warps, you would only need to change it in one place, saving you time and money (you pay for gold right?).

And onSomething is generally used for events rather than bog-standard function yet I've them being used as if there is no distinction.
Reply With Quote