This code turns up an error:
mob/proc/City()
if(usr.City = 7)
world << "WINNER: [usr]!"
usr << "YOU WIN!"
Line 2 is flagged with the error: error: missing expression. How do you fix that?
ID:149188
Jun 20 2002, 9:40 am
|
|
In response to Rcet
|
|
Well, that was fixed, but now the City code ITSELF is messed up.
turf City icon = 'city.dmi' density = 1 verb City_claim() usr.City += 1 usr << "[usr], you conquered a city!" usr.Population += 100 M:City() The last line, the one that executes the proc, is messed up. |
In response to Drafonis
|
|
Drafonis wrote:
Well, that was fixed, but now the City code ITSELF is messed up. Small surprise, since there's no M defined anywhere in that verb. Unless there's a turf/var/M somewhere, it's not going to work. You should, however, at all costs avoid the : operator here. Lummox JR |
In response to Lummox JR
|
|
Thanks for the tips, Lummox and Rcet.
|
In response to Drafonis
|
|
ACK! Now it's an in-game bug.
The verb "City_Claim" won't refused to become a verb when the person is within one space of the city. turf City icon = 'city.dmi' density = 1 mob/verb/City_claim() usr.City += 1 usr << "[usr], you conquered a city!" usr.Population += 100 usr.City() Road icon = 'road.dmi' |
In response to Drafonis
|
|
Drafonis wrote:
ACK! Now it's an in-game bug. I don't know what you are trying to do.. But this is NOT the way to do that.. This is TOTALLY messed up, unless this is some new way to do turf verbs, which I don't think it is.. You would have to take away the "mob/", and under your City_claim verb, put set src in oview(1). -Rcet |
In response to Rcet
|
|
Thanks.
|
When checking a var, you use '==' not '='.
-Rcet