Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-06-2001, 12:28 PM
SkooL SkooL is offline
somebody to love
Join Date: Jun 2001
Location: bat country.
Posts: 3,446
SkooL is on a distinguished road
Send a message via AIM to SkooL
Sleeping...

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 sky is falling
Reply With Quote
  #2  
Old 07-06-2001, 01:49 PM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
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...=\
'sleeping'
isnt an index
try showimg 300 instead..
index higher then 199 is only shown local..
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #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
  #4  
Old 07-06-2001, 08:08 PM
SkooL SkooL is offline
somebody to love
Join Date: Jun 2001
Location: bat country.
Posts: 3,446
SkooL is on a distinguished road
Send a message via AIM to SkooL
Re: Re: Sleeping...

Quote:
Originally posted by grim_squeaker_x
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.
Ok, it works now, thanks
__________________
the sky is falling
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:14 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.