mob
Shoppie
icon = 'Mobs.dmi'
icon_state = "shop"
verb
Talk()
set src in oview(1)
set category = "Social"
alert("Hello, welcome to Clothes Mart!")
switch(input("What style of clothes would you like to buy?","Shoppie",text) in list ("Shirt", "No thanks"))
if("Shirt")
usr << "Choose the color of your shirt,"
usr.overlays+= 'Shirt.dmi'
var/icon/I = new('Shirt.dmi')
var/new_rgb = F_Color_Selector.Get_Color
var/old_rgb = rgb(255,255,255)
I.SwapColor (old_rgb,new_rgb)
And I get this error:
Variables and Mobs.dm:158::warning: use of new_rgb precedes its definition
Any idea? BTW, I am using Flick's color library.
ID:148480
![]() Jan 29 2003, 3:33 pm
|
|
Well, I tried that and it compiled fine, but when I talked to the shop keeper, I got this Runtime error:
runtime error: Cannot execute null.Get Color(). proc name: Talk (/mob/Shoppie/verb/Talk) usr: DUDE (/mob/Male) src: Shoppie (/mob/Shoppie) call stack: Shoppie (/mob/Shoppie): Talk() The game just overlayed the shirt without asking me the RGB's. Anyone else? |
Tiko587 wrote:
runtime error: Cannot execute null.Get Color(). proc name: Talk (/mob/Shoppie/verb/Talk)The only thing I can think of offhand is that you are overiding world/New() somewhere and not using ..() F_Color_Selector is created in world/New() by default, so if you don't use ..(), it won't get created. |
F_Color_Selector.Get_Color()