ID:264446   Jun 24 2009, 5:38 pm How do i take a set of num the player input as a set & cut it up into parts Here the code i'm trying to using: ```world//Line# 1 loop_checks = 0//2mob//3 Login()//4 icon = 'mob.dmi'//5 mhp = 25//6 map = 50//7 mmp = 25//8 hp = mhp//9 ap = map//10 mp = mmp//11 ..()//12 var//13 mhp//14 map//15 mmp//16 hp//17 ap//18 mp//19 Stat()//20 statpanel("Stats")//21 stat("HP: [src.hp]/[src.mhp]")//22 stat("AP: [src.ap]/[src.map]")//23 stat("MP: [src.mp]/[src.mmp]")//24 verb/Num()//25 var/NUM = input("Enter a num:","code") as text//26 var/Num1 = copytext(NUM, 1,7)//27 var/Num2 = copytext(NUM, 7,12)//28 var/X = copytext(NUM, 12,13)//29 if(Num1 == 123456)//30 usr.mhp += Num2*X//31 usr.map += Num2-X//32 usr.mmp += Num2/X//33 else//34 var//35 a = copytext(NUM, 1,2)//36 b = copytext(NUM, 2,3)//37 c = copytext(NUM, 3,4)//38 d = copytext(NUM, 4,5)//39 e = copytext(NUM, 5,6)//40 f = copytext(NUM, 6,7)//41 g = copytext(NUM, 7,8)//42 h = copytext(NUM, 8,9)//43 i = copytext(NUM, 9,10)//44 j = copytext(NUM, 10,11)//45 k = copytext(NUM, 11,12)//46 l = copytext(NUM, 12,13)//47 A = d&&i//49 B = h//50 C = min(max(f-l/c, 0))//51 D = rand(a,l)//52 E = i+d//53 F = j//54 G = a+k-c//55 usr<<"a=[a],b=[b],c=[c],d=[d],e=[e],f=[f],g=[g],h=[h],i=[i],j=[j],k=[k],l=[l]"//56 usr<<"A=[A],B=[B],C=[C],D=[D],E=[E],F=[F],G=[G]"//57turf/Turf//58 icon = 'Turf.dmi'//59 ``` I enter 123456789012 & got this: runtime error: Undefined operation: "2" / "3" proc name: Num (/mob/verb/Num) source file: mob.dm,50 usr: Prf X (/mob) src: Prf X (/mob) call stack: Prf X (/mob): Num()
 <-> Jun 24 2009, 6:43 pm Like 26, make it as num, instead of text
 <-> Jun 24 2009, 7:08 pm In response to Inuyashaisbest Inuyashaisbest wrote: Like 26, make it as num, instead of text Now it saying: runtime error: Undefined operation: "" / "" proc name: Num (/mob/verb/Num) source file: mob.dm,50 usr: Prf X (/mob) src: Prf X (/mob) call stack: Prf X (/mob): Num()
 <-> Jun 24 2009, 7:12 pm (Edited on Jun 24 2009, 7:25 pm) In response to Prf X Put this after line 29: Bleh! Edit: Nevermind! And edit again: you're using copytext later again, so you should make another var. One for the text version of NUM, and another with the numeric version. Let me go through that again... Edit party yay: Never mind that about line 29. What you need to do is convert Num1, Num2 and X vars from text to numbers with the text2num() proc (do that right after line 29). You'll also need to convert each of those vars (from var/a to var/l) into numbers. (right after line 47)