Ajuda com DEBUG

Creek

New member
Messages
45
Points
0
Github
creek
Capturar.jpg


Tava procurando um evento, ai achei o PacPoring instalei até então tudo ok no script só que quando fui verificar que ele não está sumonando no mapa os mobs que tentam matar o jogador e fica dando esse Debug no console , esse script é bem antigo se alguem puder me ajudar agradeço, Obrigado.

NPC: http://pastebin.com/iFdRMCtT

 
@@Creek

The script function getmapxy atleast uses 4 parameters of which 3 get filled by the function to return results of the search.

The first parameter is a string of the map in your case it should be named .m$pacporing1, .m$pacporing2 and .m$pacporing3 but since they omit the $ at the end of their name they are for integer variables and are not for string content which is returned by getmapxy.

Therefore to work properly you need to change them to: .m$pacporing1$, .m$pacporing2$ and .m$pacporing3$.

 
A imagem esta clara. Basta lê-la.

Não esta encontrando o mapa desejado.
Mais eu adicionei o mapa e teleporto para o mesmo normalmente, agora eu não entendi oque o gringo falou acho que ele não abriu o pastebin do script porque no script existe varios pacporing1 , estou muito confuso pode me dar uma ajuda ai?

Obrigado.

 
Last edited by a moderator:
@@Creek

I didn't open it, since the error was clear. It was just hard to find where the variable is used. In line 388.

getmapxy(getd(".m$"+strnpcinfo(3)),getd(".x"+strnpcinfo(3)),getd(".y"+strnpcinfo(3)),1);
getd gets a reference to a variable based on a string, so you can construct the variable name dynamically.

In this case getd(".m$"+strnpcinfo(3)) is the same as getd(".m$pacporing1"), so you can add the $ like this:

Code:
getmapxy(getd(".m$"+strnpcinfo(3)+"$"),getd(".x"+strnpcinfo(3)),getd(".y"+strnpcinfo(3)),1);
 
Last edited by a moderator:
@@Creek

I didn't open it, since the error was clear. It was just hard to find where the variable is used. In line 388.

getmapxy(getd(".m$"+strnpcinfo(3)),getd(".x"+strnpcinfo(3)),getd(".y"+strnpcinfo(3)),1);
getd gets a reference to a variable based on a string, so you can construct the variable name dynamically.

In this case getd(".m$"+strnpcinfo(3)) is the same as getd(".m$pacporing1"), so you can add the $ like this:

getmapxy(getd(".m$"+strnpcinfo(3)+"$"),getd(".x"+strnpcinfo(3)),getd(".y"+strnpcinfo(3)),1);
Thank you

Agora está apareçendo os mobs , porem estão com erros de movimento...e fica apareçendo o debug abaixo:

Now appearing mobs, however they are with handling errors ... and is appearing debug below:

[Debug]: mapindex_name2id: Map "" not found in index list!

http://pastebin.com/5BWuSMqg

 
@@Creek

I didn't open it, since the error was clear. It was just hard to find where the variable is used. In line 388.

getmapxy(getd(".m$"+strnpcinfo(3)),getd(".x"+strnpcinfo(3)),getd(".y"+strnpcinfo(3)),1);
getd gets a reference to a variable based on a string, so you can construct the variable name dynamically.

In this case getd(".m$"+strnpcinfo(3)) is the same as getd(".m$pacporing1"), so you can add the $ like this:

getmapxy(getd(".m$"+strnpcinfo(3)+"$"),getd(".x"+strnpcinfo(3)),getd(".y"+strnpcinfo(3)),1);

Descobri um outro problema, se o jogador deslogar no meio do evento ocorre o erro abaixo, sabe oque pode ser?

I found another problem, if the player log out in the middle of the event is the error below, what do you know you can be?

Thank You

Capturar.jpg


 
@@Creek

You use the function rid2name, that uses the account id to get the name of the currently logged in character.

If that player is logged out it will fail because the account id isn't online anymore.

 
There is another function I may be putting not be giving this error?

@@Creek

You use the function rid2name, that uses the account id to get the name of the currently logged in character.

If that player is logged out it will fail because the account id isn't online anymore.
 
Last edited by a moderator:
@@Creek

You could check if he is online before with isloggedin(<account id>) and stop execution.

 
Back
Top