diff options
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/ClassFILE.cpp | 10 | ||||
-rw-r--r-- | src/script/script.cpp | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/src/script/ClassFILE.cpp b/src/script/ClassFILE.cpp index c25d436..d5f2c6b 100644 --- a/src/script/ClassFILE.cpp +++ b/src/script/ClassFILE.cpp @@ -34,7 +34,7 @@ void PrepareFilename(CBotString &filename) pos = filename.ReverseFind('\\'); if ( pos > 0 ) { - filename = filename.Mid(pos+1); // Remove files with + filename = filename.Mid(pos+1); // Remove files with } pos = filename.ReverseFind('/'); @@ -57,7 +57,7 @@ void PrepareFilename(CBotString &filename) // get the filename as a parameter // execution -bool rfconstruct (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception) +bool rfconstruct (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception) { CBotString mode; @@ -79,7 +79,7 @@ bool rfconstruct (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exceptio if ( mode != "r" && mode != "w" ) { Exception = CBotErrBadParam; return false; } // no third parameter - if ( pVar->GivNext() != NULL ) { Exception = CBotErrOverParam; return false; } + if ( pVar->GivNext() != NULL ) { Exception = CBotErrOverParam; return false; } } // saves the file name @@ -238,7 +238,7 @@ CBotTypResult cfopen (CBotVar* pThis, CBotVar* &pVar) return CBotTypResult(CBotTypBoolean); } - + // process FILE :: close // execeution @@ -290,7 +290,7 @@ bool rfwrite (CBotVar* pThis, CBotVar* pVar, CBotVar* pResult, int& Exception) if ( pVar->GivInit() != IS_DEF) { Exception = CBotErrNotOpen; return false; } FILE* pFile= (FILE*)pVar->GivValInt(); - + int res = fputs(param+CBotString("\n"), pFile); // if an error occurs generate an exception diff --git a/src/script/script.cpp b/src/script/script.cpp index d2946a6..d9d6444 100644 --- a/src/script/script.cpp +++ b/src/script/script.cpp @@ -1056,7 +1056,7 @@ bool rProduce(CBotVar* var, CBotVar* result, int& exception, void* user) object->SetActivity(false); object->ReadProgram(0, (char*)name); object->RunProgram(0); - + result->SetValInt(0); // no error return true; } @@ -1759,7 +1759,7 @@ CBotTypResult cSend(CBotVar* &var, void* user) if ( var == 0 ) return CBotTypResult(CBotErrLowParam); if ( var->GivType() > CBotTypDouble ) return CBotTypResult(CBotErrBadNum); var = var->GivNext(); - + if ( var == 0 ) return CBotTypResult(CBotTypFloat); if ( var->GivType() > CBotTypDouble ) return CBotTypResult(CBotErrBadNum); var = var->GivNext(); @@ -2249,7 +2249,7 @@ bool rMotor(CBotVar* var, CBotVar* result, int& exception, void* user) turn = left-right; if ( turn < -1.0f ) turn = -1.0f; if ( turn > 1.0f ) turn = 1.0f; - + if ( pThis->RetFixed() ) // ant on the back? { speed = 0.0f; @@ -3568,7 +3568,7 @@ void CScript::New(CEdit* edit, char* name) edit->SetCursor(cursor2, cursor1); edit->ShowSelect(); edit->SetFocus(true); - + sf = m_main->RetScriptFile(); if ( sf[0] != 0 ) // Load an empty program specific? { @@ -3730,7 +3730,7 @@ bool CScript::ReadStack(FILE *file) if ( m_botProg == 0 ) return false; if ( !m_botProg->RestoreState(file) ) return false; - + m_object->SetRunScript(this); m_bRun = true; m_bContinue = false; |