Seite 279 von 340 ErsteErste ... 179 229 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 329 ... LetzteLetzte
Zeige Ergebnis 8.341 bis 8.370 von 10174

C/C++ Programming Help Thread

This is a discussion on C/C++ Programming Help Thread within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; Hey, iv been messing with the stuff on the computer, setting up a my function. Just a quick question, is ...

  
  1. #8341
    QJ Gamer Bronze
    Points: 8.045, Level: 60
    Level completed: 48%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Australia
    Beiträge
    659
    Points
    8.045
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    Hey, iv been messing with the stuff on the computer, setting up a my function. Just a quick question, is it possible to do something like:
    Code:
    char str[32]="Im a string";
    string str2;
    strcpy(str2, str);
    Obviously it doesnt work but is there anything like this?



  2. #8342
    QJ Gamer Bronze
    Points: 6.359, Level: 52
    Level completed: 5%, Points required for next Level: 191
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    france
    Beiträge
    170
    Points
    6.359
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Xsjado7
    Hey, iv been messing with the stuff on the computer, setting up a my function. Just a quick question, is it possible to do something like:
    Code:
    char str[32]="Im a string";
    string str2;
    strcpy(str2, str);
    Obviously it doesnt work but is there anything like this?
    I think this will do it:
    Code:
    char str[32]="Im a string";
    string str2(str);
    even this works (only to show you that you can do things like that, example above is better for this exact case you have)
    Code:
    char str[32]="Im a string";
    string str2=str; //or string str2="Im a string"
    of course if you just want to declare a string that is initialized, do it simply like this:
    Code:
    string str2("Im a string");
    http://www.cplusplus.com/reference/s...ng/string.html
    Try my latest game (iOS):


  3. #8343
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Code:
    char str[32]="Im a string";
    string str2( str );
    string str3 = str;

  4. #8344
    QJ Gamer Bronze
    Points: 8.045, Level: 60
    Level completed: 48%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Australia
    Beiträge
    659
    Points
    8.045
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    Sweet, thanks guys
    -= Double Post =-
    okay, iv got m function working perfectly on computer but i just put it into my game and i get:
    Code:
    scores.cpp(34) : error: 'string' was not declared in this scope
    Iv added -lstdc++ in my makefile so what am i missing?
    -= Double Post =-
    iv got past that error now, i just had to include <string>. Now im getting a few errors:
    Code:
    source/scores.cpp(57) : error: incompatible types in assignment of 'std::basic_s
    tring<char, std::char_traits<char>, std::allocator<char> >' to 'char [128]'
    source/scores.cpp(73) : error: incompatible types in assignment of 'std::basic_s
    tring<char, std::char_traits<char>, std::allocator<char> >' to 'char [128]'
    source/scores.cpp(83) : error: incompatible types in assignment of 'std::basic_s
    tring<char, std::char_traits<char>, std::allocator<char> >' to 'char [128]'
    source/scores.cpp(93) : error: incompatible types in assignment of 'std::basic_s
    tring<char, std::char_traits<char>, std::allocator<char> >' to 'char [128]'
    source/scores.cpp(103) : error: incompatible types in assignment of 'std::basic_
    string<char, std::char_traits<char>, std::allocator<char> >' to 'char [128]'
    those lines consist of:
    Code:
    score.hs1name = loadbuff3.substr(1, seperator-1);
    just with a different variable name e.g score.hs2name...
    Note: Everything worked fine on the computer
    Geändert von Xsjado7 (04-01-2008 um 08:09 AM Uhr) Grund: Automerged Doublepost

  5. #8345
    QJ Gamer Silver
    Points: 10.263, Level: 67
    Level completed: 54%, Points required for next Level: 187
    Overall activity: 0%

    Registriert seit
    Jun 2006
    Ort
    UK
    Beiträge
    2.326
    Points
    10.263
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    What datatype is score.hs2name?

  6. #8346
    Points: 3.509, Level: 37
    Level completed: 6%, Points required for next Level: 141
    Overall activity: 0%

    Registriert seit
    Apr 2007
    Beiträge
    33
    Points
    3.509
    Level
    37
    Downloads
    0
    Uploads
    0

    Standard

    can anyone help me out, i've been trying to shutdown the psp with the square button and including psppower.h but i dont know what is needed to power off in 3.90 as this call is old afaik

    i've been trying
    Code:
    		else if (pad.Buttons & PSP_CTRL_SQUARE)
    		{
                      sceSysconPowerStandby();
    		}

  7. #8347
    QJ Gamer Gold
    Points: 14.678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Beiträge
    1.523
    Points
    14.678
    Level
    78
    Downloads
    0
    Uploads
    0

    Standard

    Code:
    int write(int fd, char *Buff, int NumBytes);
    Does this work on PSP? Can I use a file descriptor?

  8. #8348
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    Considering your function name is so vague and not in the SDK or STL no *rolls eyes*

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here


  9. #8349
    QJ Gamer Gold
    Points: 14.678, Level: 78
    Level completed: 57%, Points required for next Level: 172
    Overall activity: 0%

    Registriert seit
    Nov 2006
    Beiträge
    1.523
    Points
    14.678
    Level
    78
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von SG57
    Considering your function name is so vague and not in the SDK or STL no *rolls eyes*
    Yeah... It's for dos;
    Now-a-days i'm intermixing multiple platforms (3 to be exact)

  10. #8350
    QJ Gamer Bronze
    Points: 5.583, Level: 48
    Level completed: 17%, Points required for next Level: 167
    Overall activity: 0%

    Registriert seit
    May 2007
    Beiträge
    127
    Points
    5.583
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    actually it should work fine. its posix (unistd.h) fwrite works, which just wraps write. just ignore sg57. you can use it.
    -- Code Monkey : Sarien, Fishguts, Cracks and Crevices --

    "Did IQ's just drop sharply while I was away?" (Ripley)

  11. #8351
    QJ Gamer Blue
    Points: 4.296, Level: 41
    Level completed: 73%, Points required for next Level: 54
    Overall activity: 0%

    Registriert seit
    Jul 2006
    Beiträge
    132
    Points
    4.296
    Level
    41
    Downloads
    0
    Uploads
    0

    Standard

    ok guys iv been trying to get this right for a few days but have had no luck.

    so i have a code for collision right, but i dont know how to correctly modify it so it works for one more sprite on the screen.

    this is the code for 1 sprite collision:

    Code:
    if ((img1posX + img1width > img2posX) &&
           (img1posX < img2posX + img2width) &&
           (img1posY + img1height > img2posY) &&
           (img1posY < img2posY + img2height) )
    now when i try to modify it for another sprite on the screen, the second sprite still has no collision =\ but the first sprite still does.

    my code:
    Code:
    if ((img1posX + img1width > img2posX) &&
           (img1posX < img2posX + img2width) &&
    	   (img1posX + img1width > img3posX) &&
           (img1posX < img2posX + img3width) &&
           (img1posY + img1height > img2posY) &&
           (img1posY < img2posY + img2height) )

  12. #8352
    QJ Gamer Bronze
    Points: 8.045, Level: 60
    Level completed: 48%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Australia
    Beiträge
    659
    Points
    8.045
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    Spoiler for Post:
    Zitat Zitat von yaustar
    What datatype is score.hs2name?
    Just realised its a char[32] and not a std::string. Fixed that now. Code compiles but when running i get caught on:
    Code:
    name1 = loadbuff3.substr(1, seperator-1);
    Prior to that i have:
    Code:
    separator = loadbuff3.find("|");
    Im using the official sony savedata functions so my highscores are loaded as one string. An example of whats stored/loaded:
    Code:
    "032.5=Me|034.9=You|105.0=Someone|096.6=Someoneelse|025.2=Santa"
    I have "|" between each highscore. After i have found the first score float with atof() i remove the score and = sign so im essentially left with:
    Code:
    "Me|"
    Then i simply find the separator and read from the start of the file to the separator and that gets me the name. Any ideas why this isnt working?

  13. #8353
    QJ Gamer Bronze
    Points: 6.359, Level: 52
    Level completed: 5%, Points required for next Level: 191
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    france
    Beiträge
    170
    Points
    6.359
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von yaustar
    What datatype is score.hs2name?
    I guess it's a char[128].

    the = operator works only in one way:
    string = char[] is ok
    char[] = string doesn't work

    but you can get a const char* from a string with mystring.c_str() if that helps.
    -= Double Post =-
    xsjado, maybe I can help you with this function:

    Code:
    vector<string> split(string str, string delim)
    {
    	vector<string> results;
    	unsigned int cutAt;
    	while((cutAt = str.find_first_of(delim)) != str.npos)
    	{
    		if(cutAt > 0)
    		{
    			results.push_back(str.substr(0,cutAt));
    		}
    		str = str.substr(cutAt+1);
    	}
    	if(str.length() > 0)
    	{
    		results.push_back(str);
    	}
    	return results;
    }
    it splits a string given a delimiter, and returns it as a vector.
    for example, split("032.5=Me|034.9=You |105.0=Someone|096.6=Some oneelse|025.2=Santa", "|") will give you a vector containing this:
    "032.5=Me"
    "034.9=You"
    "105.0=Someone"
    etc...
    and with the same technique you can get what you want from the string.
    -= Double Post =-
    cruisx, if you have a working function for collision between 2 sprites, just call it for all your sprites on screen, change the parameters that's all...
    Geändert von daaa57150 (04-02-2008 um 12:17 AM Uhr) Grund: Automerged Doublepost
    Try my latest game (iOS):


  14. #8354
    QJ Gamer Bronze
    Points: 8.045, Level: 60
    Level completed: 48%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Australia
    Beiträge
    659
    Points
    8.045
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    I spend two hours learning C++ functions and writing out my function then i log on today to find this

  15. #8355
    QJ Gamer Bronze
    Points: 6.359, Level: 52
    Level completed: 5%, Points required for next Level: 191
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    france
    Beiträge
    170
    Points
    6.359
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Xsjado7
    I spend two hours learning C++ functions and writing out my function then i log on today to find this
    spending time learning is a good thing ;)
    Try my latest game (iOS):


  16. #8356
    QJ Gamer Bronze
    Points: 8.045, Level: 60
    Level completed: 48%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Australia
    Beiträge
    659
    Points
    8.045
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    Do you know why my code isnt working though? It just gets to:
    Code:
    name1 = loadbuff3.substr(1, seperator-1);
    and nothing happens, doesnt do it

  17. #8357
    QJ Gamer Bronze
    Points: 6.359, Level: 52
    Level completed: 5%, Points required for next Level: 191
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    france
    Beiträge
    170
    Points
    6.359
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Xsjado7
    Do you know why my code isnt working though? It just gets to:
    Code:
    name1 = loadbuff3.substr(1, seperator-1);
    and nothing happens, doesnt do it
    I'll need the whole function or code block.
    Try my latest game (iOS):


  18. #8358
    QJ Gamer Bronze
    Points: 8.045, Level: 60
    Level completed: 48%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Australia
    Beiträge
    659
    Points
    8.045
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    Code:
      pspDebugScreenInit();
      //This is for the seperator between scores
      int seperator;
      //This is for the "=" sign between the time and name in a highscore
      int equals;
      //The buffer for use with atof
      char* loadbuff2;
      //The buffer for use with string:: functions
      string loadbuff3;
      //For storing the highscore names
      string name1, name2, name3, name4, name5;
      
      //Conversions
      //Convert global.loadbuff for use with string:: functions
      loadbuff3 = global.loadbuff;
      loadbuff2 = new char [loadbuff3.size()+1];
      strcpy(loadbuff2, loadbuff3.c_str());
      pspDebugScreenPrintf("loadbuff3 copied to loadbuff2\n");
      
      //Get first highscore data
      //Get score.hs1
      score.hs1 = atof(loadbuff2);
      pspDebugScreenPrintf("Got time from first highscore\n");
    
      //Remove score.hs1 from loadbuff3
      loadbuff3.erase(0, 5);
      pspDebugScreenPrintf("Erased furst highscore from loadbuff3\n");
    
      //Get the seperator from between the data of the first and second highscores
      seperator = loadbuff3.find("|");
      pspDebugScreenPrintf("Found seperator from between highscore 1 and 2\n");
    
      //Read from six bytes in to the seperator AKA get the name for the first highscore
      name1 = loadbuff3.substr(1, seperator-1);
      pspDebugScreenPrintf("Got first highscore name\n");

  19. #8359
    QJ Gamer Bronze
    Points: 6.359, Level: 52
    Level completed: 5%, Points required for next Level: 191
    Overall activity: 0%

    Registriert seit
    Sep 2006
    Ort
    france
    Beiträge
    170
    Points
    6.359
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    it's because:
    - strings indices start at 0
    - substr is like this: string.substr(size_t pos = 0, size_t n = npos) with pos = where to start, n = length of the substring, and not where to stop.

    your code (I suppose loadbuff=="Me|"):
    name1 = loadbuff3.substr(1, seperator-1);
    does this:
    name1 = loadbuff3.substr(1, 1);
    so name="e".

    I haven't tested but maybe try to write name1 = loadbuff3.substr(0, seperator); to see if I'm right.

    http://www.cplusplus.com/reference/s...ng/substr.html
    Try my latest game (iOS):


  20. #8360
    QJ Gamer Bronze
    Points: 8.045, Level: 60
    Level completed: 48%, Points required for next Level: 105
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Ort
    Australia
    Beiträge
    659
    Points
    8.045
    Level
    60
    Downloads
    0
    Uploads
    0

    Standard

    Forgot to mention, each float is stored as 5 characters, 3 digits for the seconds, a full stop and one digit for the miliseconds if that helps for anything.

    Also its:
    Code:
    name1 = loadbuff3.substr(1, seperator-1);
    because i havent removed the "=" sign so its going to be "=Me|".
    -= Double Post =-
    So does anyone have any ideas as to why the PSP gets caught at using .substr? Doesnt make any sense
    Geändert von Xsjado7 (04-02-2008 um 06:34 AM Uhr) Grund: Automerged Doublepost

  21. #8361
    I'm back!
    Points: 8.236, Level: 61
    Level completed: 29%, Points required for next Level: 214
    Overall activity: 99,0%

    Registriert seit
    Feb 2007
    Ort
    England
    Beiträge
    902
    Points
    8.236
    Level
    61
    Downloads
    0
    Uploads
    0

    Standard

    How do I make a buffer start at a specific memory address of my own choice? I need it for this function:

    Code:
    /**
     * Load a module from a buffer
     *
     * @param buf - Pointer to a buffer containing the module to load.  The buffer must reside at an
     *              address that is a multiple to 64 bytes.
     * @param bufsize - Size (in bytes) of the buffer pointed to by buf.
     * @param flags - Unused, always 0.
     * @param option - Pointer to an optional ::SceKernelLMOption structure.
     *
     * @returns The UID of the loaded module on success, otherwise one of ::PspKernelErrorCodes.
     */
    SceUID sceKernelLoadModuleBuffer(void *buf, SceSize bufsize, int flags, SceKernelLMOption *option);
    I also keep getting errors when I try and use a function from another module. I've made a module that has all the graphics things I need in order to remove all the libraries from my main code and shrink it, it loads fine and without error, but when I attempt to use the functions it crashes giving me 0x8002013A, library not yet linked. Is there a common fix for this or should I post my makefile and stub?

    Thanks.
    -Aura
    Last.fm | Deviant Art | First working OS picture

    Zitat Zitat von nickxab Beitrag anzeigen
    I will beat myself. :p

  22. #8362
    QJ Gamer Bronze
    Points: 5.583, Level: 48
    Level completed: 17%, Points required for next Level: 167
    Overall activity: 0%

    Registriert seit
    May 2007
    Beiträge
    127
    Points
    5.583
    Level
    48
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Auraomega
    How do I make a buffer start at a specific memory address of my own choice? I need it for this function:
    add enough to get it to round to the next size without overflowing the buffer.

    Code:
    uint8_t *buff = malloc( 63 + buffsize);
    void *rebase = buff & ~0x3F;
    something like that. you'll need the original address to pass to free() so dont throw it away....
    -- Code Monkey : Sarien, Fishguts, Cracks and Crevices --

    "Did IQ's just drop sharply while I was away?" (Ripley)

  23. #8363
    Developer
    Points: 7.577, Level: 58
    Level completed: 14%, Points required for next Level: 173
    Overall activity: 0%

    Registriert seit
    Mar 2006
    Beiträge
    1.026
    Points
    7.577
    Level
    58
    Downloads
    0
    Uploads
    0

    Standard

    memalign() should work.

    Check out my homebrew & C tutorials at http://insomniac.0x89.org/
    Coder formerly known as Insomniac197

    tshirtz: what is irshell ??
    Atarian_: it's where people who work for the IRS go when they die

  24. #8364
    lol
    Points: 20.859, Level: 91
    Level completed: 2%, Points required for next Level: 491
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Whittier, CA
    Beiträge
    5.791
    Points
    20.859
    Level
    91
    Downloads
    0
    Uploads
    0

    Standard

    I go this
    Code:
     unsigned int *personapointer=(unsigned int*) (0x004FFE8C+0x08800000);
    Now how do I get that value + an offset into a new pointer?

    Code:
     unsigned int *newPointer=(unsigned int*) (personapointer + 0x0000006E);
    ?

  25. #8365
    Ænima
    Points: 6.447, Level: 52
    Level completed: 49%, Points required for next Level: 103
    Overall activity: 0%

    Registriert seit
    Sep 2007
    Beiträge
    587
    Points
    6.447
    Level
    52
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Anti-QuickJay
    I go this
    Code:
     unsigned int *personapointer=(unsigned int*) (0x004FFE8C+0x08800000);
    Now how do I get that value + an offset into a new pointer?

    Code:
     unsigned int *newPointer=(unsigned int*) (personapointer + 0x0000006E);
    ?
    I think you have to add '&', signifying you mean the value of the address the pointer points to, not the pointer itself.

    Code:
    unsigned int *newPointer = (unsigned int*) (&personapointer+0x0000006E);
    [IMG]http://upload.wikimedia.org/wikipedia/commons/thumb/c/c5/Zoso.svg/744px-Zoso.svg.png[/IMG]

    Looking for some good C programming tutorials for the PSP? Look no further! [URL="http://psp-coding.com/"]PSP-Coding.com[/URL] is your source for all your PSP coding needs.

  26. #8366
    It's good to be free...
    Points: 10.420, Level: 67
    Level completed: 93%, Points required for next Level: 30
    Overall activity: 0%

    Registriert seit
    Feb 2007
    Beiträge
    2.440
    Points
    10.420
    Level
    67
    Downloads
    0
    Uploads
    0

    Standard

    Well, you asked me this over AIM, but you never responded to me after I gave you your answer :/
    First off, pointer arithmetic is different. Say you have this:
    Code:
    printf("%u\n",sizeof(some_t));
    some_t *pSome = NULL;
    pSome += 1;
    printf("%u",pSome);
    What do you think this would output if the first printf outputs 4?
    Here's what it doesn't output:
    Code:
    4
    1
    Here's what it does output:
    Code:
    4
    4
    Why? Because "adding one" to a pointer actually adds the size of the pointer. Here's an analogy (that should be unambiguous):
    Code:
    some_t* operator+(some_t *pointer, int incr) {
        return (some_t*)((unsigned int)pointer + (sizeof(some_t)*incr));
    }
    So yeah, pointer arithmetic is different.

    Second, if you actually want to go to the position 0x6E after personapointer, you'd be going to an invalid address for a unsigned int type and would get a bus error if you tried to access the location in memory.

    (PS: Judas, that would give you 0x6E positions after the POINTER to personapointer, not what personapointer was pointing to)
    pəʇuɒɹɓ ɹoɟ ɓuɪɥʇou əʞɒʇ

  27. #8367
    lol
    Points: 20.859, Level: 91
    Level completed: 2%, Points required for next Level: 491
    Overall activity: 0%

    Registriert seit
    Aug 2006
    Ort
    Whittier, CA
    Beiträge
    5.791
    Points
    20.859
    Level
    91
    Downloads
    0
    Uploads
    0

    Standard

    Ok, thanx

    Sorry about not responding to your AIM, my internet got disconnected for some reason so I just went to play God of War.
    :/

  28. #8368
    Developer
    Points: 3.206, Level: 35
    Level completed: 4%, Points required for next Level: 144
    Overall activity: 0%

    Registriert seit
    Aug 2007
    Beiträge
    74
    Points
    3.206
    Level
    35
    Downloads
    0
    Uploads
    0

    Standard

    Zitat Zitat von Auraomega
    How do I make a buffer start at a specific memory address of my own choice? I need it for this function:

    Code:
    /**
     * Load a module from a buffer
     *
     * @param buf - Pointer to a buffer containing the module to load.  The buffer must reside at an
     *              address that is a multiple to 64 bytes.
     * @param bufsize - Size (in bytes) of the buffer pointed to by buf.
     * @param flags - Unused, always 0.
     * @param option - Pointer to an optional ::SceKernelLMOption structure.
     *
     * @returns The UID of the loaded module on success, otherwise one of ::PspKernelErrorCodes.
     */
    SceUID sceKernelLoadModuleBuffer(void *buf, SceSize bufsize, int flags, SceKernelLMOption *option);
    Thanks.
    -Aura
    You don't need to choose your own address, just need to make sure your buffer is 64 Byte aligned.

    Code:
    const u8 myModule[MY_MODULE_SIZE] __attribute__((aligned(64))) =
    {
        // ...your bin2c'd module... 
    };
    
    sceKernelLoadModuleBuffer(myModule, MY_MODULE_SIZE, 0, NULL);
    This is a kmode function btw.

    EDIT:

    Zitat Zitat von Auraomega
    I also keep getting errors when I try and use a function from another module. I've made a module that has all the graphics things I need in order to remove all the libraries from my main code and shrink it, it loads fine and without error, but when I attempt to use the functions it crashes giving me 0x8002013A, library not yet linked. Is there a common fix for this or should I post my makefile and stub?
    Yea you need to post the stub, specifically your imports attributes flag. Is your lib for umode or kmode exports, or both? Post your exports attributes flag from your exports file as well then.
    Geändert von SilverSpring (04-03-2008 um 02:06 AM Uhr)
    PSP PRX LibDoc's Lives On!
    http://silverspring.lan.st/

    My new home:
    http://my.malloc.us/silverspring/

  29. #8369
    QJ Gamer Silver
    Points: 12.501, Level: 73
    Level completed: 13%, Points required for next Level: 349
    Overall activity: 62,0%

    Registriert seit
    Sep 2007
    Ort
    AUS
    Beiträge
    284
    Points
    12.501
    Level
    73
    Downloads
    0
    Uploads
    0

    Standard

    Hey guy's,
    I can't seem to get my head around some adhoc scaning for my luaplayer.
    This is the function so far
    void scanadhoc(int *length,void *buf)
    {
    struct SceNetAdhocctlScanInfo *scaninfo;
    /** Scan info structure */
    sceNetAdhocctlScan();
    sceNetAdhocctlGetScanInfo (length, buf);
    }
    It compiles well and when called it runs fine but i cant seem to get the adhoc list (the list of availabe adhoc networks to show)
    Regards
    Homemister
    PS and help would be great.
    Wyvern. That is all

  30. #8370
    words are stones in my <3
    Points: 35.274, Level: 100
    Level completed: 0%, Points required for next Level: 0
    Overall activity: 0%

    Registriert seit
    Jul 2005
    Ort
    Spokane
    Beiträge
    5.008
    Points
    35.274
    Level
    100
    My Mood
    Lonely
    Downloads
    1
    Uploads
    0

    Standard

    You really haven't given us the problem. You gave us a function that apparently works, not how your using it which is what we need I could write up a quick lua player specific function (the one you add to the array of functions and their name according) if you'd like. I'm busy for like an hour now though :X

    ...at what speed must I live.. to be able to see you again?...

    Projects

    You can support my Open World 3D RPG for PSP by voting for it here



 

Tags for this Thread

Forumregeln

  • Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
  • Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
  • Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
  • Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.
  •  





Alle Zeitangaben in WEZ -8. Es ist jetzt 09:28 PM Uhr.

Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © , Caputo Media, LLC. All Rights Reserved. Cluster .