View Single Post
  #4  
Old 01-09-2011, 04:04 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
Quote:
Originally Posted by TSAdmin View Post
It's expecting there to be no spaces between "setlevel2", and where it's going to, as such thinks that the "setlevel2" part is missing a semicolon. You're mixing GS1 with GS2. The GS2 format for setLevel2 is, using one of your lines for example:

PHP Code:
    case "Warp000":
      
player.setLevel2("callimap_c1.nw"1010);
      
player.dir 2;
      
player.chat "Warped to the OSL!";
    break; 
As you can see, the format for setLevel2() is ReferenceObject.setLevel2("LevelNameInQuotes.nw", X, Y);
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




Quote:
Originally Posted by Codein View Post
Although not relevant to your problem, there is a lot of duplication in there. It might be a good idea to abstract out the repeated code into a function.
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

Reply With Quote