Thread: Sleeping...
View Single Post
  #3  
Old 07-06-2001, 03:02 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Re: Sleeping...

Quote:
Originally posted by SkooL
NPC Code:
if (strequals(#m(sleep)&&||playersprite=38) {
showimg sleeping,emoticon_Zzz_stay.mng,playerx,playery-2;
}
if (!strequals(#m(sleep)&&||playersprite=38) {
hideimg sleeping;
}


Why do I get the error 'Error: Expected format: if (flag) command;'? It looks like the right format...=\
The second ( in your strequals check should be a , plus &&|| = &&0|| which means the script can never do anything.
Like this:
NPC Code:
if (playerenters||timeout) {
if (strequals(#m,sleep)||playersprite=38) showimg sleeping,emoticon_Zzz_stay.mng,playerx,player-2;
else hideimg sleeping;
timeout=0.05;
}


Although this would be the same as giving it an index of 0; since sleeping is a variable without a defined value it will default to 0.
__________________

Reply With Quote