Register | Login
Forum Index > Source Help > assignment detecting
Author Message
Pages: 1 2 3 4
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1080] - posted: 2012-05-12 21:44:03

there is still something unclear here.

If i get your code well , you just extract the entire source code in strSource buffer inside
the FileEntry function.

then from where can i navigate that source code and start execute it and manipulate it ?

http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1082] - posted: 2012-05-12 22:44:10
what so much is not clear, i've already told you executing line by line is not possible for what you want, so using this method you can manipulate the source:

Code:
function FileEntry(DWord handle; char* code) {
  uses edi;
  m_strFill(strSource, 1, 0); //set first character as null so we can re-use for strAppend
  
  //your usual code here
  char tmp[2048];
 
  edi = strGetLine(code, @tmp);
  while(edi <> 0) {
    Ziron_ShowMessage(@tmp);

    //do some changes to line @tmp (which will be emitted to strSource
    
    emitLine(@tmp);
    edi = strGetLine(edi, @tmp);
  }  
  
  //update the internal buffer, so Ziron can handle this file with updates
  Ziron_SetFileBuffer(handle, strSource, strLen(strSource));
}



Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1101] - posted: 2012-05-14 20:38:39

I have tested it and found that , the function emitLine casues access violation in plugin.

I think strAppend or strlcpy has some problem , see post #[1095].

http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1102] - posted: 2012-05-14 21:48:21
bare in mind the function emitLine i just wrote without any testing and so on, but you can try disable mmx and sse to see if it works

just after program declaration:

Code:
program WIN....etc

#sse off;
#mmx off;


Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1103] - posted: 2012-05-14 22:01:28

i know that , you just give an idea and did not test the code.

still crash after disable the MMX & SSE.

BTW , does strAppend test the length of destination buffer , and test the amount of bytes ,
not the entire length of buffer , against the length of appended string?

http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1104] - posted: 2012-05-14 23:48:28
I'm pretty sure strAppend is fine, see this post: http://www.codeziron.com/forum.php?page=topic&id=63#post345

i've double checked and there is no problems.

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1106] - posted: 2012-05-15 18:59:22

ok , so where coude be the problem here?



http://www.freewebs.com/ogremagic/index.htm
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1108] - posted: 2012-05-15 20:08:36
OK just an update for you, i've almost fixed the problem, first issue was add var, value had a small bug, but now i search for source problem.

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Pages: 1 2 3 4
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 7 user(s) online. 0 member(s) and 7 guest(s)
Most users ever online was 1046, January 28, 2022, 2:08 pm.


Statistics:
Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51
Welcome to our newest member, yecate
const Copyright = '2011-2024 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd