Jump to content
  • 0

Fix Warning in Recompile


Question

Posted

Hi heyo! :) i would like to ask for a little support about the source of Karmic about the Sarah's Instance Memorial.

The one that Ziu Posted. i try to add this into my server. yeah after recompiling i got this minor Warning shows in VS2010

http://oi61.tinypic.com/260qtn6.jpg

here's the source:

BUILDIN_FUNC(playertalk)
{
    int display_name;
    const char* message;
    char message_output[255];
    struct map_session_data *sd = script_rid2sd(st);
   
    display_name = script_getnum(st, 2);
    message = script_getstr(st, 3);
   
    if(display_name)
        sprintf(message_output, "%s: %s", sd->status.name, message);
    else
        sprintf(message_output, "%s", message);
   
    clif_disp_overhead(sd, message_output);

    return 0;
}

8 answers to this question

Recommended Posts

Posted

Hello, if you feel that this is a bug on latest version of rA, please make a report on GitHub Issue instead /thx

 

I guess this is bug or something problem with the source. my current revision 48c2cf2dec.

Anyone can fixed this warning whenever i recompile?

Posted (edited)

 

You're passing the wrong value. It should be:

clif_disp_overhead(sd->bl, message_output);

 

i'll try this .

 

BUILDIN_FUNC(playertalk)
{
    int display_name;
    const char* message;
    char message_output[255];
    struct map_session_data *sd = script_rid2sd(st);
   
    display_name = script_getnum(st, 2);
    message = script_getstr(st, 3);
   
    if(display_name)
        sprintf(message_output, "%s: %s", sd->status.name, message);
    else
        sprintf(message_output, "%s", message);
    clif_disp_overhead(sd->bl, message_output);

    return 0;
}
1>..\src\map\script.c(21071): error C2440: 'function' : cannot convert from 'block_list' to 'block_list *'
1>..\src\map\script.c(21071): warning C4024: 'clif_disp_overhead' : different types for formal and actual parameter 1
Edited by Azeroth

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...