|
3 registered members (AndrewAMD, Grant, valino),
3,361
guests, and 13
spiders. |
|
Key:
Admin,
Global Mod,
Mod
|
|
|
Re: can anyone help me?
[Re: yunn]
#312159
02/23/10 14:53
02/23/10 14:53
|
Joined: Apr 2006
Posts: 737 Ottawa, Canada
Ottawa
User
|
User
Joined: Apr 2006
Posts: 737
Ottawa, Canada
|
HI!
Try placing this part in the while
if(str_cmp(chair,"chair.mdl") == 1){ var_total += 130; } wait(1);
Hope this helps! Ottawa  Ver 7.86.2 Pro and Lite-C
|
|
|
Re: can anyone help me?
[Re: yunn]
#312488
02/25/10 02:23
02/25/10 02:23
|
Joined: Apr 2006
Posts: 737 Ottawa, Canada
Ottawa
User
|
User
Joined: Apr 2006
Posts: 737
Ottawa, Canada
|
Hi yunn!
All your evaluations ssssssss of the situation must be in the while loop.
This way they all get evaluated many times.
Now the coffee table is evaluated once and then the chair is evaluated many times. Since the while does not stop it never comes back to the coffee...(joke..so all you get is a sip of coffee and then many chairs.)
Also the wait (1); must be in the while loop to avoid an endless loop.
Hope this helps! Ottawa  Ver 7.86.2 Pro and Lite-C
|
|
|
Re: can anyone help me?
[Re: yunn]
#313601
03/02/10 13:57
03/02/10 13:57
|
Joined: Dec 2006
Posts: 1,086 Queensland - Australia
Nidhogg
Serious User
|
Serious User
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
|
How about getting rid of all those while loops and using
switch(blah) { case chairs: calculation stuff here; break;
case tables: calculation stuff here; break; }
If you get my meaning.
Windows XP SP3 Intel Dual Core CPU: E5200 @ 2.5GHz 4.00GB DDR3 Ram ASUS P5G41T-M LX PCIE x16 GeForce GTS 450 1Gb SB Audigy 4 Spyware Doctor with AntiVirus
|
|
|
Re: can anyone help me?
[Re: Nidhogg]
#313606
03/02/10 14:40
03/02/10 14:40
|
Joined: Apr 2006
Posts: 737 Ottawa, Canada
Ottawa
User
|
User
Joined: Apr 2006
Posts: 737
Ottawa, Canada
|
Hi!
Go back to the first posts and read the posts of Foxhound and then MrGuest. Those are probably your next steps.
Nidhogg's point is very good. It would simplify the process.
Since each entity has a set of 100 skills it's a cool way of keeping track of prices for each item.
Hope this helps! Ottawa  Ver 7.86.2 Pro and Lite-C
|
|
|
|