[Duda] Extended Vending System

Viendo el diff de forma rapida no veo mayores problemas con el sistema de interfaces, 

Con la mirada rapida que di cambia 

pc_getzeny por pc->getzeny

pc_payzeny por pc->payzeny

pc_paycash por pc->paycash

pc_getcash por pc->getcash

Aparte de eso no veo más problemas en el codigo, asumiendo que fue bien aplicado el diff.

Pega los errores aca para ver cuales son.

Saludos!

 
Aunque bueno, dada la tendencia a "pluginizar" todo, ya va siendo hora de hacer de esto un plugin, ¿no?

 
jaBote tiene razon, si tan solo supiera algo de SRC xD soy mejor en clientside y scripting

 
XD mas que un plug debería estar de forma permanente en el emu ya que se ve que es muy útil y le da versatilidad a los merchant xd.

PD: La versión original = tiene un pluss y es que trae mas opciones para comerciar (zeny - cash - puntos de votacion e items(tcg o poring coin))

 
Bueno HIze lo que me dijo Xgear y aunque me salieron menos errores aun tengo estos

2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(1357): error C2065: 'db_path' : undeclared identifier
2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(1357): warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int'
2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(1357): warning C4024: 'function through pointer' : different types for formal and actual parameter 1
2>c:documents and settingsadministradorescritoriohercules 11950srcmapskill.c(6316): warning C4013: 'pc_can_give_items' undefined; assuming extern returning int
2>c:documents and settingsadministradorescritoriohercules 11950srcmapvending.c(160): warning C4013: 'pc_inventoryblank' undefined; assuming extern returning int
2>c:documents and settingsadministradorescritoriohercules 11950srcmapvending.c(241): warning C4013: 'pc_additem' undefined; assuming extern returning int
2>c:documents and settingsadministradorescritoriohercules 11950srcmapvending.c(243): warning C4013: 'pc_delitem' undefined; assuming extern returning int
2>c:documents and settingsadministradorescritoriohercules 11950srcmapvending.c(243): warning C4013: 'pc_search_inventory' undefined; assuming extern returning int
 


 
Cambia lo siguiente:

pc_can_give_items = pc->can_give_items

pc_additem = pc->additem

pc_delitem = pc->delitem

pc_search_inventory = pc->searc_inventory

pc_inventoryblank = pc->inventoryblank

sv->readdb(db_path, "item_vending.txt", ',', 1, 1, ARRAYLENGTH(item_vend), &itemdb_read_vending); // Extended Vending system [Lilith]

por

sv->readdb(iMap->db_path, "item_vending.txt", ',', 1, 1, ARRAYLENGTH(item_vend), &itemdb_read_vending); // Extended Vending system [Lilith]

 
Como recomendación general, cuando estes implementando algun diff y te aparezcan errores, date una vuelta por este link y busca las funciones que te dan error, para que veas como se mapearon para el HPM. 
Basicamente es un buscar y reemplazar en la mayoria de los casos.
 
Saludos!
 
No hay problema, mientras que no sea abuso estamos bien
default_tongue.png


 
<p>Tratare de no abusar pero el consultar es parte del aprender creo XD</p>

 
Last edited by a moderator:
T.T hora me salieron mas errores que antes xd

2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(1357): error C2065: 'db' : undeclared identifier
2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(1357): error C2223: left of '->path' must point to struct/union
2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(1357): warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int'
2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(1357): warning C4024: 'function through pointer' : different types for formal and actual parameter 2
2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(1357): warning C4047: 'function' : 'int' differs in levels of indirection from 'bool (__cdecl *)(char **,int,int)'
2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(1357): warning C4024: 'function through pointer' : different types for formal and actual parameter 6
2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(1357): error C2198: 'function through pointer' : too few arguments for call
 
 
Creo que este es un error mas complejo
 
No cambiaste db_path por db->path, o si?

Tienes que cambiarlo por iMap->db_path. Revisalo bien.

db_path es parte de la interface de map, por lo que se referencia por iMap

 
Ya me doy vez que arreglo algo mas errores xd a vender por zeny nomas xd.

Aca dejo los ultimos errores.

2>c:documents and settingsadministradorescritoriohercules 11950srcmapclif.c(17011): error C2065: 'item_vend' : undeclared identifier
2>c:documents and settingsadministradorescritoriohercules 11950srcmapclif.c(17011): error C2065: 'item_vend' : undeclared identifier
2>c:documents and settingsadministradorescritoriohercules 11950srcmapclif.c(17011): error C2109: subscript requires array or pointer type
2>c:documents and settingsadministradorescritoriohercules 11950srcmapclif.c(17012): error C2065: 'item_vend' : undeclared identifier
2>c:documents and settingsadministradorescritoriohercules 11950srcmapclif.c(17012): error C2109: subscript requires array or pointer type
2>c:documents and settingsadministradorescritoriohercules 11950srcmapclif.c(17012): error C2198: 'itemdb_exists' : too few arguments for call
 
2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(941): error C2065: 'item_vend' : undeclared identifier
2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(941): error C2109: subscript requires array or pointer type
2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(1357): error C2065: 'item_vend' : undeclared identifier
2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(1357): error C2065: 'item_vend' : undeclared identifier
2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(1357): error C2109: subscript requires array or pointer type
2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(1357): warning C4047: 'function' : 'int' differs in levels of indirection from 'bool (__cdecl *)(char **,int,int)'
2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(1357): warning C4024: 'function through pointer' : different types for formal and actual parameter 6
2>c:documents and settingsadministradorescritoriohercules 11950srcmapitemdb.c(1357): error C2198: 'function through pointer' : too few arguments for call
 
2>c:documents and settingsadministradorescritoriohercules 11950srcmapskill.c(6329): error C2065: 'item_vend' : undeclared identifier
2>c:documents and settingsadministradorescritoriohercules 11950srcmapskill.c(6329): error C2065: 'item_vend' : undeclared identifier
2>c:documents and settingsadministradorescritoriohercules 11950srcmapskill.c(6329): error C2109: subscript requires array or pointer type
2>c:documents and settingsadministradorescritoriohercules 11950srcmapskill.c(6330): error C2065: 'item_vend' : undeclared identifier
2>c:documents and settingsadministradorescritoriohercules 11950srcmapskill.c(6330): error C2109: subscript requires array or pointer type
2>c:documents and settingsadministradorescritoriohercules 11950srcmapskill.c(6330): error C2198: 'itemdb_exists' : too few arguments for call
2>c:documents and settingsadministradorescritoriohercules 11950srcmapskill.c(6341): error C2065: 'item_vend' : undeclared identifier
2>c:documents and settingsadministradorescritoriohercules 11950srcmapskill.c(6341): error C2109: subscript requires array or pointer type
2>c:documents and settingsadministradorescritoriohercules 11950srcmapskill.c(6341): fatal error C1903: unable to recover from previous error(s); stopping compilation
 


 
Eso ya es un problema de la modificación en si. item_vend es una estructura pero no se declara en ningun lado.

Ya me estoy dando cabezasos de sueño. Prueba dejando un post en el topic de la modificación o mañana lo veo más a fondo.

 
Last edited by a moderator:
vale bro gracias. por todo. creo que saldría mas fácil que vieras todo el diff. Descansa y muy amable por responder todo lo consultado.

 
Se me habia olvidado completamente -_-'

Prueba con eso, es de una revision de hoy. Me compilo sin problemas en windows. 

Avisame como te va.
Gracias Xgear ya trabaja el sistema pero tiene algunos errores ya que al tratar de comprar por cash te pide zeny en tu cuenta aun cuando te descuenta el cash y no el zeny y cuando creas el vending en vez del mensaje cash sale zeny te dejo unas screen para que veas lo que digo iran mas menos en oreden xd.

screenHercules000.jpg

screenHercules006.jpg

screenHercules004.jpg

screenHercules005.jpg

 
Back
Top