Forum: Grand Theft Auto Series Modding - Our GTA Modding Team is the best around. Tutorials & Topics related to modding your GTA games, trophies, and save files! Discuss GTA game modding with the knowledgeable members of PSX-Scene and the Official GTA IV Mod Team.


The above video goes away if you are a member and logged in, so log in now!




 
Would you like to get all the new info from
PSX-Scene in your email each day?




Want to learn more about the team keeping you up to date with the latest scene news?

Read about them now!

Check out our Developer bios, too!

 


User Tag List

Like Tree46Likes

Thread: [TUT] How to Compile Code + Example Scripts
  

Page 13 of 16 FirstFirst ... 3 11 12 13 14 15 ... LastLast
Results 121 to 130 of 159
  1. #121  
    zorg93's Avatar
    zorg93 is online now Developer
    Join Date
    Jun 2012
    Posts
    263
    Downloads
    0
    Uploads
    0
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    51
    Likes Received
    144
    Quote Originally Posted by jumper View Post
    Maybe it's another scocl limitation that you can't return vectors.

    I don't know if will help your situation but another way to work around it would be to return each float individually, I just did a little test and this seems to compile and run fine:

    Spoiler

    way too much work
    i just used
    PHP Code:
    void GetOffset(float distancefloat *xfloat *yfloat *z)
    {
     
    Vector3 result;
    GET_PED_BONE_POSITION(GetPlayerPed(), BONE_RIGHT_HANDdistance0.0fdistance * -0.04f, &result);
    *
    result.x;
    *
    result.y;
    *
    result.z;

    on a similar note though, by reflecting the dotnetscripthook for pc and looking at memory addresses etc, all a vector 3 is is 12 bytes split into 3 floats one after the other, which in sco terms would mean 3 floats on the stack and then a pointer to reference them as one variable
    Reply With Quote  

  2. #122  
    zorg93's Avatar
    zorg93 is online now Developer
    Join Date
    Jun 2012
    Posts
    263
    Downloads
    0
    Uploads
    0
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    51
    Likes Received
    144
    Quote Originally Posted by Hamden View Post
    when i try to compile i get this error c:/scocl/workspace/MP V2/m_trainer.c<n/a>: line: <n/a> => compiler: <llvm> data/function is undefined "print". can someone please help me and tell what to do and how to do it to fix this error?
    stick this at the top of your c file, just below the include statements
    PHP Code:
    void print(char *string)
    {
    CLEAR_PRINTS();
    PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING"string25001);

    Reply With Quote  

  3. #123  
    jumper's Avatar
    jumper is offline Developer
    Join Date
    Jul 2005
    Posts
    289
    Downloads
    3
    Uploads
    0
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    74
    Likes Received
    207
    Oh, I didn't know how to do that with pointers, thanks for the info.
    Reply With Quote  

  4. #124  
    Hamden is offline Registered User
    Join Date
    Mar 2012
    Posts
    7
    Downloads
    0
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    0
    Likes Received
    2
    Quote Originally Posted by zorg93 View Post
    stick this at the top of your c file, just below the include statements
    PHP Code:
    void print(char *string)
    {
    CLEAR_PRINTS();
    PRINT_STRING_WITH_LITERAL_STRING_NOW("STRING"string25001);

    that part is working now but i get this error

    main.c<n/a>: line: n/a => compiler: <llvm> data/function is undefined "SET_CHAR_n"
    Reply With Quote  

  5. #125  
    zorg93's Avatar
    zorg93 is online now Developer
    Join Date
    Jun 2012
    Posts
    263
    Downloads
    0
    Uploads
    0
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    51
    Likes Received
    144
    Quote Originally Posted by Hamden View Post
    that part is working now but i get this error

    main.c<n/a>: line: n/a => compiler: <llvm> data/function is undefined "SET_CHAR_n"
    it appears you made a mistake with a native,
    just do a quick search in your c file for SET_CHAR_n and then correct it for the native is is supossed to be
    Reply With Quote  

  6. #126  
    ribonucleic's Avatar
    ribonucleic is online now Moderator & Developer
    Join Date
    Mar 2012
    Posts
    652
    Downloads
    4
    Uploads
    0
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    127
    Likes Received
    280
    just tried to compile some assembly with scocl and llvmcl asked for a command switch named -fasm-blocks, seeing as scocl doesn't accept this switch i am going to see if i can patch scocl to insert it or short llvmcl so it doesn't need it

    edit: never succeeded with this
    Last edited by ribonucleic; 02-27-2013 at 09:53 PM.
    Reply With Quote  

  7. #127  
    ribonucleic's Avatar
    ribonucleic is online now Moderator & Developer
    Join Date
    Mar 2012
    Posts
    652
    Downloads
    4
    Uploads
    0
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    127
    Likes Received
    280
    guys is it possible to draw semi-circles (shaped like a slice of pizza) and lines at an angle?

    edit: on the screen not in the game world
    Reply With Quote  

  8. #128  
    coldmurda is offline Member
    Join Date
    Jun 2012
    Posts
    113
    Downloads
    1
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    19
    Likes Received
    23
    Quote Originally Posted by ribonucleic View Post
    guys is it possible to draw semi-circles (shaped like a slice of pizza) and lines at an angle?

    edit: on the screen not in the game world
    I know for a fact you can do lines at an angel with DRAW_REC by messing with the positions and scale. When I had no idea what I was doing with it I made a box that cut the screen in half so the box was in the shape of a triangle.
    Reply With Quote  

  9. #129  
    ribonucleic's Avatar
    ribonucleic is online now Moderator & Developer
    Join Date
    Mar 2012
    Posts
    652
    Downloads
    4
    Uploads
    0
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    127
    Likes Received
    280
    Quote Originally Posted by coldmurda View Post
    I know for a fact you can do lines at an angel with DRAW_REC by messing with the positions and scale. When I had no idea what I was doing with it I made a box that cut the screen in half so the box was in the shape of a triangle.
    cut in half as bottom-left-to-top-right/bottom-right-to-top-left?

    i'm gonna describe what i'm looking to achieve, i want to make a speedo that partially surrounds the radar with a needle that moves across the numbers, first i need to know if and how to draw the needed shapes a curved line might do the trick if thats possible
    Reply With Quote  

  10. #130  
    coldmurda is offline Member
    Join Date
    Jun 2012
    Posts
    113
    Downloads
    1
    Uploads
    0
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Likes Given
    19
    Likes Received
    23
    Quote Originally Posted by ribonucleic View Post
    cut in half as bottom-left-to-top-right/bottom-right-to-top-left?

    i'm gonna describe what i'm looking to achieve, i want to make a speedo that partially surrounds the radar with a needle that moves across the numbers, first i need to know if and how to draw the needed shapes a curved line might do the trick if thats possible
    Yes it was from the top right to the bottom left (the edge was very pixelated), im sure with something as small and narrow as you would like to achieve would look better though.
    Like I said, I was a complete noob so the way I did it exactly, I do not remember. I know I randomly divided some of the parameters though. Sorry for being so fague, I will attempt to do it again, your idea interests me
    Reply With Quote  

Page 13 of 16 FirstFirst ... 3 11 12 13 14 15 ... LastLast
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •